You are reading a single comment by @Proceed and its replies. Click here to read the full conversation.
  • Hi @Robin, I edited the original post to include the process.memory() output.
    Unfortunately I am not able to get rid of parts of the code as it's an engine that needs most of it's parts running.

  • Sun 2019.07.28

    Thank you @Proceed. So we have 2500 JsVars less some overhead to work with on the Pixl.

    'I am not able to get rid of parts of the code' . . . 'needs most of it's parts'

    Understood. My point was to find a reasonable amount of code that would fit, which would provide a benchmark as a percentage of total size for the original, then make a determination as to whether parts of the source module could be removed.

    https://www.espruino.com/Performance

    Minification enabled?
    WebIDE >> Settings >> Minification


    This might provide some insight to an alternate means using additional memory:

    How-to run code from flash

    Espruino loading source code from SD card?

  • Didn't you get something like New interpreter error: LOW_MEMORY,MEMORY Explanation here

    Just some numbers: The Pixl.JS contains an nRF52832 that has 512k flash and 64k ram. And a lot of that is used by Espruino.
    So if your code is really that over half megabyte of minified JS, it won't fit in the Pixl. With some serious wizardry to store almost all of your code in some external flash (something like SD card, SPI flash), and pulling in small chunks of that to work on some piece of data, it might work. But most likely you would have to forget about 99% of JS available in NPM, because it's just too big. Or for example there is no Symbol in Espruino.

About

Avatar for Proceed @Proceed started