how is the performance of "Storage.getValue" , will it take much more clock cycles and power reading data from disk than from memory, and will it affect the life of the disk(maybe flash?)
Should I try to avoid using Storage.getValue
how is the performance of "Storage.getValue" , will it take much more clock cycles and power reading data from disk than from memory, and will it affect the life of the disk(maybe flash?)
Should I try to avoid using Storage.getValue
I found this other thread useful: https://forums.garmin.com/developer/connect-iq/f/discussion/7721/migrating-from-properties-to-storage
It seems that reading from Storage is slow. But I don't know about power usage or affecting storage life.
I tried my own tests for speed of Storage.read in the simulator but I don't know how that compares to an actual device. In the sim it was about 150ms per read and didn't depend on the size of the data (100-1000 bytes). So it was better to minimize the number of reads and store all data as one block. And to use Properties where possible (but they use more memory as they are cached).
I wouldn't use Properties unless there was an associated setting, as that can impact peak memory and other things. You'll want to only read/write Storage when you really need to. Like read things when an app starts and write when an app exits or infrequently. Hitting the file system on the device is slow, and you won't see the same timings in the sim.