initialize vs onStart optimization

What should be done in Application's initialize and what in onStart?

What about View's initialize vs onLayout?

I'd like to cache some things, and I wonder where should I put these things (and why):

- capabilities:
    mHasStress = Toybox has :SensorHistory && Toybox.SensorHistory has :getBodyBatteryHistory;

- strings, resources, fonts:
    mMyString = WatchUi.loadResource(Rez.Strings.DateTimeFormat);

- properties:
    mMyProp = getProperty("foo");

  • One thing to consider is onStart() runs not only for your main app, but it will also run each time a background service runs  Same with onStop, but there you can figure out if it's the main app or the background service with a trick.

    For initialize() vs onLayout(), use onLayout if you need the dc.  Things like dc.getWidth(). dc.getFontHeight(), etc

    I typically do all my "has" conditions in initialize() and set a boolean (checking a boolean is cheaper processor wise than another "has").