-
Sun 2019.07.28
Thank you @Proceed. So we have 2500 JsVars less some overhead to work with on the Pixl.
'I am not able to get rid of parts of the code' . . . 'needs most of it's parts'
Understood. My point was to find a reasonable amount of code that would fit, which would provide a benchmark as a percentage of total size for the original, then make a determination as to whether parts of the source module could be removed.
Minification enabled?
WebIDE >> Settings >> MinificationThis might provide some insight to an alternate means using additional memory:
-
Didn't you get something like
New interpreter error: LOW_MEMORY,MEMORY
Explanation hereJust some numbers: The Pixl.JS contains an nRF52832 that has 512k flash and 64k ram. And a lot of that is used by Espruino.
So if your code is really that over half megabyte of minified JS, it won't fit in the Pixl. With some serious wizardry to store almost all of your code in some external flash (something like SD card, SPI flash), and pulling in small chunks of that to work on some piece of data, it might work. But most likely you would have to forget about 99% of JS available in NPM, because it's just too big. Or for example there is noSymbol
in Espruino.
Hi @Robin, I edited the original post to include the
process.memory()
output.Unfortunately I am not able to get rid of parts of the code as it's an engine that needs most of it's parts running.