pellepl / spiffs

Wear-leveled SPI flash file system for embedded devices
MIT License
1.52k stars 402 forks source link

the problem of slowing down the file that is opened append #263

Open erkanakarcay opened 4 years ago

erkanakarcay commented 4 years ago

I have opened the file such as the below, but a short time a later process of writing occur so slowing

SPIFFS_open(&fs, "my_file", SPIFFS_APPEND | SPIFFS_RDWR, 0); SPIFFS_write(&fs, fd, (uint8_t *) &Data, sizeof (Data); SPIFFS_close(&fs, fd);

thanks

erkanakarcay commented 4 years ago

I have analyzed the problem. I want to write 1KByte data but this process slows after the 12KByte data. At first 12Kbyte data, the writing process reads 3 flash areas and writes. However, after the 12Kbyte data, this process reads a lot of flash areas and writes.