Initially, in my setup for a ui I had a lot of level 0 code that built the ui, which means: code that is immediately executed on upload. To have the build in level 0 intended to make what is built to be saved. But it made me run out of memory. After packing it into a function and run it onInit() overcame the memory issue. Whit that I conclude that Espruino deals better with functions invoked at or after onInit() than with lengthy level 0 code. Could be a double buffering issue or a-like, but have no further details.
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.
...forgot to mention:
Initially, in my setup for a ui I had a lot of level 0 code that built the ui, which means: code that is immediately executed on upload. To have the build in level 0 intended to make what is built to be saved. But it made me run out of memory. After packing it into a function and run it onInit() overcame the memory issue. Whit that I conclude that Espruino deals better with functions invoked at or after onInit() than with lengthy level 0 code. Could be a double buffering issue or a-like, but have no further details.