In Espruino's console, I made some initial memory tests.
I set the
to what the server delivers as JSON string. This used 137 variable elements of 2250 total.
Then I set the responseObect to the JSON parsed responseText:
var responseObj = JSON.parse(responseText);```
This used another 240 variable elements of 2250 total.
No code (except the variable references) - just the response string and response JS object use 377 variable elements of 2250, leaving 1837 for all the other things.
A variable element is a number of bytes and is also a garbage collection entity (btw, strings are chained memory elements... so not contiguous memory bytes by definition, and therefore concatenation is quite 'simple' and effective) - Espruino has separate Web pages about implementation, performance, memory usage.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
In Espruino's console, I made some initial memory tests.
I set the
var responseObj = JSON.parse(responseText);```
This used another 240 variable elements of 2250 total.
No code (except the variable references) - just the response string and response JS object use 377 variable elements of 2250, leaving 1837 for all the other things.
A variable element is a number of bytes and is also a garbage collection entity (btw, strings are chained memory elements... so not contiguous memory bytes by definition, and therefore concatenation is quite 'simple' and effective) - Espruino has separate Web pages about implementation, performance, memory usage.
This is from Espruino's Web IDE console:
1 Attachment