Best practice using SPIFFS
Posted: Tue Oct 13, 2015 3:51 pm
Beginning to do work with SPIFFS on the arduino IDE, and I have some questions....
I'm going to try and use SPIFFS instead of storing big arrays in RAM. I'm concerned with heap usage, and speed.
1) If i open a file, I use about 120Bytes of heap, so not much. is this really the overhead of having a file open?
2) Is having more than one file open at a time acceptable (Seems to maintain the 120bytes of heap, even 120bytes for 3 files) as writing to an open file is super fast, whereas .. see below..
3) Is it acceptable to open a file, and keep it open? are writes immediately saved... because close() takes around 3-4ms.
just wanting to know more about how it all works?
many thanks all
I'm going to try and use SPIFFS instead of storing big arrays in RAM. I'm concerned with heap usage, and speed.
1) If i open a file, I use about 120Bytes of heap, so not much. is this really the overhead of having a file open?
2) Is having more than one file open at a time acceptable (Seems to maintain the 120bytes of heap, even 120bytes for 3 files) as writing to an open file is super fast, whereas .. see below..
3) Is it acceptable to open a file, and keep it open? are writes immediately saved... because close() takes around 3-4ms.
just wanting to know more about how it all works?
many thanks all