Battery friendly approach

Hi

I try to develop some watchface but have some wonderings. For sure battery juice is resource i wouldn't like to spill. 

is it better to render my own font based on dc.drawing commands like fillPolygon, etc or

to draw bitmap font loaded from resources

each approach has it's own pros and drawbacks from programming standpoint, but i'd like to learn something about battery approach

  • Hi, 

    Unless I did not get your words but the better way for custom font is to create your own font with for exemple font forge and conbert it with bmfont.

    More efficient, less memory, so less calculation, so less battery draining 

  • And native fonts are more efficient than custom fonts.  You can see this when you use custom fonts in onPartialUpdae and watch the Watch face diagnostics.

    in general, onUpdate is only called once a minute (except after a gesture), and when looking for performance/battery gains, a place to look is in onPartialUpdate, as that runs every second and it's easy to see the impact of things with the watch face diagnostics.

    Another place is backrounding.  If you're doing comm, that can have an impact (it's even noted when someone downloads a WF).  Let's say you're getting the weather.  While you can do that every 5 minutes, you may not want to do that, as the weather and it's data might not change that often.  Doing it every 15 minutes could be fine while that background only runs 1/3 as often

  • I'm new to developing code on my Fenix 6 and I'm curious about what type of power consumption information may be available while designing an app.  Jim, what are the "watch face diagnostics" you mentioned?  So far from simple battery percentage figures I seem to be doing OK with app development not using excessive power, but I'd like a way to measure real-time power consumption as I enable/disable various features in an app.  Is there a way to do that?

  • In the sim is "view watchface diagnostics" under the file menu.  You'll see thinsg releated to onPartial upade (which is limited to an avg of 30m each second over a minute.

    This for example is showing at about 9.2 ms, and the breakdown on where that time is spent.  It's a WF that updates seconds and HR every second.