Let me use this snippet and make the difference visible with process.memory().
no optimization
process.memory(); ={ free: 1267, usage: 333, total: 1600, history: 170, gc: 0, gctime: 1.862 }
module uploaded as function
process.memory() ={ free: 1265, usage: 335, total: 1600, history: 170, gc: 0, gctime: 1.862 }
use module from flash
process.memory() ={ free: 1357, usage: 243, total: 1600, history: 60, gc: 0, gctime: 1.874 }
freeHeap is for all cases 11736
how many vars you save depends on the size of the module . Running SH1106 from storage saves round about 90 vars.
That should justify the extra effort ;-)
ESP8266_4MB board has now 48 pages to store any stuff you like, check the build content
Hint: At the moment storage is only working for the first segment, read issue #1507
Why not write a script as workaround until someone adds this feature into the WebIDE or command line tool
@MaBe started
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.
Let me use this snippet and make the difference visible with process.memory().
no optimization
process.memory();
={ free: 1267, usage: 333, total: 1600, history: 170,
gc: 0, gctime: 1.862 }
module uploaded as function
process.memory()
={ free: 1265, usage: 335, total: 1600, history: 170,
gc: 0, gctime: 1.862 }
use module from flash
process.memory()
={ free: 1357, usage: 243, total: 1600, history: 60,
gc: 0, gctime: 1.874 }
freeHeap is for all cases 11736
how many vars you save depends on the size of the module .
Running SH1106 from storage saves round about 90 vars.
That should justify the extra effort ;-)
ESP8266_4MB board has now 48 pages to store any stuff you like, check the build content
Hint: At the moment storage is only working for the first segment, read issue #1507
Why not write a script as workaround until someone adds this feature into the WebIDE or command line tool