The problem you are facing is that you are uploading your code to RAM and not somewhere to flash storage, which means all the code is stored in RAM as a string, which takes up a lot of space, considering the font. You can see the difference yourself by logging the memory used at the beginning of the file and saving to file vs. RAM (using console.log(process.memory())).
I suspect the non-Layout version didn't run out of memory with the code in RAM because while Layout is great, it does use a lot of RAM to compute the (initial?) sizes of everything.
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.
The problem you are facing is that you are uploading your code to RAM and not somewhere to flash storage, which means all the code is stored in RAM as a string, which takes up a lot of space, considering the font. You can see the difference yourself by logging the memory used at the beginning of the file and saving to file vs. RAM (using
console.log(process.memory())
).I suspect the non-Layout version didn't run out of memory with the code in RAM because while Layout is great, it does use a lot of RAM to compute the (initial?) sizes of everything.