title: What is the performance cost of calculating values in onDraw vs reading them from memory when drawing on android canvas?
body: <p>When I optimize my android app is it worth it to move all calculations from <code>onDraw()</code> to for ex.<code>onSurfaceChanged()</code> and store calculated values?
  For example I got:</p>
  
  <pre><code>onDraw(...){
  ...
  canvas.drawText(text,
                      mBounds.left+ mLineXOffset,
                      mBounds.top + mLineYOffset,
                      mTextPaint);
  </code></pre>
  
  <p>Will it be much difference in terms in battery drain if I pre calculate all absolute values in <code>onSurfaceChanged()</code>?</p>
  
  <p>Edit: in this case onDraw is probably called few times a second and app is always "screen on".</p>