Using Async : import fails #629
Replies: 4 comments
-
Posted at 2016-09-24 by @gfwilliams It's possible that other users were using an older, smaller version of async? Also, maybe try putting Problem is, when you upload a module, it actually needs 3x the amount of memory to load it in. First it comes it via the input buffer, then the string has to get parsed, then finally loaded into memory. It means that realistically your 21k needs 63k of memory to load in (even if it only uses 21k once loaded), which is more than the Pico has available. If you desperately need it, I'd consider stripping out async functions you're not going to use. Personally I'd try to avoid using it though - I think the time it saves will be wasted again trying to fit the rest of your code into the remaining memory. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-24 by GeekBot Thank you Gordon, I didn't know the amount of requested memory. I will write some basic primitives instead of using Async. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-26 by @MaBecker @Geekbot - try this small Async.js helper, uploaded by Thorsten von Eicken |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-10-02 by GeekBot Thank you MaBe, looks very interesting, I will test it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-09-24 by GeekBot
Hello,
I wish to use the Async library, because it would save me a lot of time... I got the last version of the library from http://caolan.github.io/async/index.html . The minified and the non minified files are placed in the modules directory.
The target is Espruino Pico V1.86.
I reset() the target and then import with this code :
The import fails and returns:
The minified file is 20816 bytes (so it should get into memory ?).
It seems that some other Espruino users managed to use Async on Espruino.
Any clue and advice is welcome.
GeekBot
Beta Was this translation helpful? Give feedback.
All reactions