Glance view onUpdate

Hi guys,

As I'm still waiting for the real device (btw - authorized local reseller said - they don't know when they come - oh Garmin, Garmin...) - I'm able to do tests only in simulator. Yet I got from owner of device information + short video - that my glance view is causing visible slow down of scrolling through glance view.

Could we get clarification then how to optimize drawing glance view?

Currently I'm doing all the drawing directly in 'onUpdate' - full refresh of the view. I have noticed in simulator however that when switching to glance view - 'onUpdate' is called twice (I'm just putting info through System.println)

1. Does it makes sense that onUpdate check when was it last time refresh and skip whole redraw? (e.g. using Storage)

2. To be more specific - when watch is calling 'onUpdate' - each time we scroll to a glance view, or no more often than 30 seconds - so scrolling quickly through glances (after first refresh) should be quicker?

3. Other solution would be to prepare everything into buffered bitmap (so scroll will be slowed down only one) and then render buffered bitmap - anybody know - it will work with glance view? As bitmaps from resources are not (yet?) working

4. Simplify drawings... I know

Thanks!

Stan

  • For my TidalFlow widget I had a similar problem.

    The drawing of my glance was too complicated and slow to allow a smooth scrolling experience.

    I solved it using a buffered bitmap.

    There is unfortunately still a small lag the first time the bufferedbitmap is rendered, but thereafter it scrolls smoothly.

    You will additionally have to apply some code optimizations and simplifications to try and reduce the initial lag as well.

    It would have been great if one could render it in a background process and save it to Storage, but that is not possible.

    For TidalFlow it only needs to render the buffered bitmaps once per day, or each time a user forces a refresh. But I still have to draw it the first time the glance carousel is activated.

  • Former Member
    Former Member over 5 years ago in reply to HermoT

    Thanks for a hint!

    Would be nice to have kind of profiler to trace speed of execution on the watch - as long time ago I was using one for C++ writing :)