So, I confused about require("Storage").read RAM less or RAM more
It's as the docs say - it doesn't use RAM, it just returns a memory-mapped String pointing to flash.
I believe that comment was about Tensorflow. Tensorflow is unable to work directly from the flash memory so in Tensorflow's case you have to load from Flash into RAM.
returned data between require("Storage").read with A string of data and require("Flash").read with A Uint8Array of data
require("Flash").read actually loads straight into RAM, but require("Storage").read doesn't.
Realistically there's not really much of a case where you should be using require("Flash") now, unless you're doing something very low level
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
It's as the docs say - it doesn't use RAM, it just returns a memory-mapped String pointing to flash.
I believe that comment was about Tensorflow. Tensorflow is unable to work directly from the flash memory so in Tensorflow's case you have to load from Flash into RAM.
require("Flash").read
actually loads straight into RAM, butrequire("Storage").read
doesn't.Realistically there's not really much of a case where you should be using
require("Flash")
now, unless you're doing something very low level