How to optimize the memory storage so the watch has the most memory available in background that fails to exit when it runs out of memory?
Let's say a variable A eats 1 memory , item B eats 100 memory units
How much from the quota available in the watch's background process eats:
- A/B stored by App.getApp().setProperty
- A/B stored by Storage.setValue
- how does it differ when using char 'c' vs string with length of ten like "string-10" as an identifier
Sys.getSystemStats().freeMemory gives pretty chaotic measurements.
It seems like setProperty is not the eating memory, setValue eats 32B just when used for the first time, and size of keys don't matter.
Is that correct assessment of the behavior?
What is the best approach to conserve the most memory for the background process while having couple of big arrays and many small settings to store?