Acknowledged
CIQQA-3160

Simulator onUpdate Delay Issue with SDK 8.1.0 and 8.1.1

I'm encountering a timing issue in the simulator when running my app with SDK versions 8.1.0 and 8.1.1.

My app uses a combination of two timers and web requests. In the simulator, there is a consistent delay of 5 to 15 seconds after a View.onUpdate() call before any subsequent event (timer, user input, etc.) is processed.

Here’s what I’ve observed:

  • When onUpdate() is triggered via WatchUi.requestUpdate(), the delay occurs after the single onUpdate() call.

  • When onUpdate() is triggered via WatchUi.switchToView(), the delay can occur between the two onUpdate() calls and also after the second call.

The delay becomes more pronounced as the number of views increases, which results in higher memory usage (including buffered bitmaps) and additional timer events with more processing.

Importantly:

  • The issue does not occur when running the same code with SDK 7.1.1 in the simulator.

  • The issue also does not occur when the app is compiled with SDK 8.1.1 and run on a real device.

My primary test device is the Epix 2 Pro 47mm, but the problem is reproducible on other devices in the simulator as well.

To reproduce the issue, please clone the project from GitHub:

https://github.com/TheNinth7/evcc-garmin/tree/PerformanceRefactoring

For the app settings you need test sites (URLs), please contact me to receive the Postman URLs that you can use to reproduce the issue.

  • I am now developing a second app, and after introducing a timer-based task queue there, I’ve run into similar problems. Notably, the issue only affects the loading of "View" implementations. I use "CustomMenu" quite heavily, and so far, the issue has never occurred when opening a "CustomMenu".

    27.5.2025 6:38:15: TaskQueue: stop executing tasks after 110ms (5 remaining)
    27.5.2025 6:38:15: ViewHandler.pushView: new stack size=2
    27.5.2025 6:38:15: CustomView.onUpdate: start
    27.5.2025 6:38:15: CustomView.onUpdate: end
    27.5.2025 6:38:20: CustomView.onUpdate: start
    27.5.2025 6:38:20: CustomView.onUpdate: end
    27.5.2025 6:38:20: TaskQueue: start executing tasks (5 queued)

    Further details can be found here github.com/.../137

  • For reproducing the issue you need also some test URLs. I have some public Postman mock servers, but I do not want to post the URL publicly. Please let me know how I can provide them to you.

  • Thank you for the CIQ project to reproduce the issue. This helps a lot with investigating issues. I'll take a look and pass this along to the CIQ tools team.

  • Another potentially important observation: the "delay" after onUpdate also affects the simulator UI itself. I can open the menu, but if I click on options like Profiler or Memory, those screens only appear after the app resumes processing.