As a rule of thumb, expect to be able to store 12 characters for each 'JsVar' reported by process.memory, so if you have 5000 variables then that's 60,000 characters.
But in order to actually load a module, you have to be able to send it as a string, unescape that string, and then convert that to real functions in memory - so realistically each module needs 3 times that to load - even if once loaded it'll only use about the original amount of memory.
... so actually you could load more into Espruino if you had a few smaller modules than if you had one large one.
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.
I think it's a bit too complex for that...
As a rule of thumb, expect to be able to store 12 characters for each 'JsVar' reported by
process.memory
, so if you have 5000 variables then that's 60,000 characters.But in order to actually load a module, you have to be able to send it as a string, unescape that string, and then convert that to real functions in memory - so realistically each module needs 3 times that to load - even if once loaded it'll only use about the original amount of memory.
... so actually you could load more into Espruino if you had a few smaller modules than if you had one large one.
Hope that helps!