You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • 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!

About

Avatar for Gordon @Gordon started