• Just to add an option #3:

    • Re-write the JsVar code such that instead of jsVars containing all your variables, it is actually a 'cache', with all variables actually stored in Flash.
    • Use jsvLock/jsvUnLock to load variables out of flash and stick them in the cache in RAM. On UnLock, write any changes to Flash (probably as a journal).

    It's what Espruino was originally designed for (hence the lock/unlock), but I never had a need to implement it because all the flash on the MCU ended up being used up with Espruino itself.

    However, an ESP8266 with 512k of free flash is a different prospect. Does it matter if it's not that fast if you can have effectively 512k of RAM.

About

Avatar for Gordon @Gordon started