Esprima minification (used in the IDE by default) has a really nasty behavior....
It removes just about all the linebreaks. So Espruino has to hold the entire blob of code being sent over, and then execute it. I ran into this with Espruino on ESP8266 - as far as I could tell, it was being sent over as one giant blob of commands, with no linebreaks, so Espruino wouldn't process the pieces until it finally got a linebreak (assuming it didn't run out of memory first).
That's my analysis of it at least. If only there was some way to tell it to put some linebreaks in, like at the end of functions...
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.
Esprima minification (used in the IDE by default) has a really nasty behavior....
It removes just about all the linebreaks. So Espruino has to hold the entire blob of code being sent over, and then execute it. I ran into this with Espruino on ESP8266 - as far as I could tell, it was being sent over as one giant blob of commands, with no linebreaks, so Espruino wouldn't process the pieces until it finally got a linebreak (assuming it didn't run out of memory first).
That's my analysis of it at least. If only there was some way to tell it to put some linebreaks in, like at the end of functions...
Here's the code that manifests it:
https://github.com/SpenceKonde/AzzyProjects/blob/d739f857b3aedf089acf26d08a4c5a24fc9d01a4/Animate/Version5.js
With Esprima(offline) minification for modules and code, it fails with out of memory errors (often "cannot create string").
If I change the code minification to closure, it works fine.