• Sun 2021.04.25

    'what is the maximum length of storable/runnable javascript code in Espruino wifi?'

    Use process.memory() to determine the amount of free JsVars

    http://www.espruino.com/Reference#l_proc­ess_memory
    JsVars:    https://www.espruino.com/Internals

    Although it may be possible to use some fancy techinques to utilize flash in addition to available ROM, typically, Espruino needs as much memory as the code file size being uploaded, in order to unpack and reorganize in memory.

    Really rough approximation; take the number of free JsVars and divide by two to account for the need to reorganize during the upload process, then multiply by 16 bytes per JsVar.

    I don't have a WiFi handy, but if memory serves, an authentic Espruino Wifi provides around 2200 JsVars.

    2200 / 2 * 16 = 17,600 chars rough approximation

  • Do you know what is the maximum length of storable/runnable javascript code in Espruino wifi?

    require("Storage").getFree() -this is space when saving code to flash. as for html you can even upload parts of your pages as separate files to Storage and then use Storage.read("filename") in place of the strings, maybe the utf-8 encoding could be better with that.

About

Avatar for user127815 @user127815 started