As I was trying to figure out the memory consumption for Storage.SetValue, I came around another weird behavior that happens only on my real device this time, not the simulator
I've added a println at the start of the GlanceView onUpdate function that displayed the free memory. The println also prints the current time. The onUpdate is triggered by a Ui.requestUpdate in a timer that fires every FIVE seconds (mTimer.start(method(:onRefreshTimer), 5000, true)). I've also added a println in that onRefreshTimer just before that requestUpdate line (as well as in every function with the :glance label that calls requestUpdate so I would know which one triggers it). This is what the simulator shows and is expected.
Every requestUpdate from the timer is followed by a 'Free memory...' line.
21:41:28 : onRefreshTimer requestUpdate
21:41:28 : Free memory 36 KB
21:41:33 : onRefreshTimer requestUpdate
21:41:33 : Free memory 36 KB
21:41:38 : onRefreshTimer requestUpdate
21:41:38 : Free memory 36 KB
21:41:43 : onRefreshTimer requestUpdate
21:41:43 : Free memory 36 KB
Now compare this to what I see on my device:
21:46:47 : Free memory 37 KB
21:46:48 : Free memory 37 KB
21:46:48 : Free memory 37 KB
21:46:49 : Free memory 37 KB
21:46:50 : Free memory 37 KB
21:46:51 : Free memory 37 KB
21:46:52 : onRefreshTimer requestUpdate
21:46:52 : Free memory 37 KB
21:46:54 : Free memory 37 KB
21:46:54 : Free memory 37 KB
21:46:55 : Free memory 37 KB
21:46:56 : Free memory 37 KB
21:46:56 : Free memory 37 KB
21:46:57 : Free memory 37 KB
21:46:57 : onRefreshTimer requestUpdate
21:46:57 : Free memory 37 KB
21:46:59 : Free memory 37 KB
21:47:00 : Free memory 37 KB
21:47:01 : Free memory 37 KB
21:47:02 : Free memory 37 KB
21:47:02 : onRefreshTimer requestUpdate
21:47:02 : Free memory 37 KB
21:47:04 : Free memory 37 KB
Why is onUpdate being ran so frequently on my device (Fenix 7S Pro)?!?