
I am creating a logger on ESP32 that needs to write measurements to internal flash memory as fast as possible (1ms would be enough but 10ms in worst case).
Each measurement will be a set of floating point values with an integer timestamp.
What would be the most efficient and quick way to store data?
Should I use Partition.writeblocks(block_num, buf, offset) or btree object?
I am planning to struct.pack_into(fmt, buffer, offset, v1, v2, ...) in order to conserve flash space.
There is a LittleFS on / already so writeblocks would probably corrupt existing data/code? On the other hand btree intuitively seems to be slower than binary write with writeblocks at selected offset but that would allow easy write/read bytes addressed by a timestamp.
Any hints welcome
