Speeding up slow Apps on a watch

Good morning guys, 

I've got to the point where My app is slowing down my watch display..... so much so that it misses a second writing the onUpdate display , almost every second second.

I thought onUpdate was supposed to be asyncronous? so it shouldn't wait for other functions to complete ?

In any case, is there a way for me to figure out what part of the app is using all the cpu power ?

In the Sim it has plenty of free memory.... but typically is the memory useage linked to the performance?

If so, i think I'm at 39Kb out of 1490???

  • CIQ apps are single threaded, so for example, onTimer() and onUpdate() don't run at the same time.  You can try to find a bottle neck by just commenting out some code, or you can use Sys.getTimer() to time how long things are taking and find where you're spending time that way.

  • Thanks !

    I've got most of my data source coming from the oncompute info every second as you suggested. If I have activity recording active, do you think this is the lowest overhead on the system to just get oncompute values ? Or is there saving to be made if accessing the raw sensor data and then converting it when activity recording? I assume activity recording is accessing the data anyway...

  • Put in some logging with Sys.getTimer() and see where you are spending your time.  It could also be something where if you're doing a whole bunch of drawing in onUpdate it could be that.