Lag when hiding a watch face

On my Vivoactive HR, I do not experience considerable lags when I bring a 'heavy' watch face to the foreground or when it updates. However, some of them take a while to hide when I open the widget carousel, the main menu or the list of applications. Is there a trick to make this transition quicker? I have nothing implemented in onHide(), and I do not need to persist data (e.g. save in the ObjectStore).

Side question:
Is there a way to estimate or simulate the processing time of functions and operations? Someone has made an attempt on it, but it won't work in the sim:
https://forums.garmin.com/forum/developers/connect-iq/93848-watchdog-execution-limits-exception-handling
Maybe adding the max % of the watchdog timeout reached withing the app would be a great help...

  • Former Member
    Former Member over 7 years ago
    Hi,

    Also for me it is not clear why Garmin calls onUpdate when hiding a watchface.

    The trick is to use bitmap buffer, and when onHide has been called, display data from the buffer without full rendering of a watchface.

    Cheers.
  • I have asked the same thing to a Garmin developer some weeks ago and he told me that they are not using additional offscreen buffers to provide enough device memory to the developers. That means they need to call "onUpdate" whenever something changes as they do not have a bitmap buffers that could be used.

    Bye
  • Thanks for the answers, guys.

    BufferedBitmap is only available for CIQ 2.3+ devices, right? I think the lag is more relevant on older devices, so it doesn't sound like a solution to my problem (unless I'm missing some other detail...).

    Does someone know the order in which the events are triggered when the user is leaving the watch face?

    If "onUpdate" is called after "onHide", then we could easily set a flag to avoid loading/rendering everything. If it isn't the case, is there another way to know?


  • Former Member
    Former Member over 7 years ago
    Hey r.486,
    onHide is called before onUpdate. and I'm using this to dont let WF perform full rendering (only drawing from buffer is allowed.)
    Cheers.