05-06-2019 10:36
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-06-2019 10:36
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


05-06-2019 12:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
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.
Gondwana Software
05-16-2019 12:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-16-2019 12:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
This is a good post and has a section on arrays.
