• I do have a lot of other code there and I've tried to use memory saving options where possible such as typed arrays.

    if you have typed arrays or long strings that are more or less static and read only, you can write it as files to storage. Storage.read returns direct reference to flash memory area so such strings and array constructed from it do not take up RAM.

    Still there can be even more files on sd card so some API that would enumerate the list in smaller chunks or with callback would be nice. Maybe fs.readdir could return some iterator object? https://developer.mozilla.org/en-US/docs­/Web/JavaScript/Guide/Iterators_and_Gene­rators#iterators


Avatar for fanoush @fanoush started