I currently have a watch face where I define about 30 global variables to map out all my x,y coordinates for all the data fields, lines, icons and such. Those are then used in all the dc.draw commands in the onUpdate section. I have put a couple snips below.
My thought was that doing all those calculations over and over on every onUpdate would be costly to perform if I did the calculations in the dc.draw commands. So I put all the calculations as global variables thinking I could save battery by doing them once and then referencing the variables.
My question is which is more efficient/uses less battery? Carrying all those global variables or having no global variables and doing the calculations on every onUpdate?
Example
above all the functions....
var dH = System.getDeviceSettings().screenHeight;
var dM = dH/2;
var tR1 = dH*.11;
var tR1L = dH*.36;
var tR5 = dM+17;
var lH3 = dH*.675;
var tR6 = dH*.7425;
var tR6L = dH*.26;
var ftR6R = dH*.32;
var lH4 = dH*.8325;
....
onUpdate
dc.drawLine(0,lH1,dH,lH1);
dc.drawText(tR1L, tR1, font,.......;