I have a value that is already stored in a KeyValueStore.
I am setting up a loop that needs to read this value once or twice each time the loop is executed.
Is there a performance - or other - penalty to "getting" it from the KeyValueStore each time? Versus "getting" it and storing it in a private variable before the loop starts, and reading the variable each time the loop executes?
If KeyValueStores were stored on a hard drive, the answer would be obvious, but phone memory is different.
Would appreciate it if anyone has an answer.
I am setting up a loop that needs to read this value once or twice each time the loop is executed.
Is there a performance - or other - penalty to "getting" it from the KeyValueStore each time? Versus "getting" it and storing it in a private variable before the loop starts, and reading the variable each time the loop executes?
If KeyValueStores were stored on a hard drive, the answer would be obvious, but phone memory is different.
Would appreciate it if anyone has an answer.