You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Is that process.memory() that you put what you get right after uploading?

    It's possible that it's not the code that's using up memory, but stuff that it allocates (arrays/etc?)

    Having said that, 20k of code is quite a lot for a module. At the moment, to load it Espruino ends up having to store the same thing 3 separate times (momentarily), so that's ~60kB, which is going to end up being too much.

    It might be worth looking at http://www.espruino.com/Performance for some ideas about how to save memory/get your module size down.

    You should definitely try and avoid stuff like getFoo = function() { return foo; } though (if you have them) - it wastes space and slows execution down quite a lot on Espruino...

About

Avatar for Gordon @Gordon started