05-06-2019 10:36
05-06-2019 10:36
Hello all,
in my clockface I'm developing right now I want to record about 330 integer values. I store them in an array and save the array in a cbor file to keep the values if the user starts other apps.
When I read the cbor file to reload the array during startup of the clockface I get the error
Fatal Jerryscript Error: ERR_OUT_OF_MEMORY
If I use (much) smaller arrays I don't get this error.
Is there a known maximum array length for the Fitbit devices?
In this case I use an Ionic.
Regards
Capitano
05-06-2019 12:57
05-06-2019 12:57
I think the JS Number type takes 8 bytes. Try using Int16Array or something like that. And I think there are significant overheads in JSON/CBOR as well; try binary file I/O.
05-16-2019 12:17
05-16-2019 12:17
This is a good post and has a section on arrays.