Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By RichardS
#56184 I format SPIFFs and upload a 900K file to it, then the ESP parses the file and creates more files from it, its like a ZIP file, and parsing is like UNZIP :-)

Issue!

When I upload the exact same file again and re-parse and re-save the same files I go from 10 second execution to 210 seconds.... I am reading and writing 256 bytes all the time, except for the last buffer of a file write which is usually 256 or less.

I .remove() the original file before .open("filename","w");

Why slow?

RichardS

PS. I am also using me-no-dev's async tcp/ip-webserver library which does trigger itself when other things are running, so this could always be a gotcha..... but at the time of the upload and parse its the only thing happening, I can deal with contentions later...
User avatar
By RichardS
#56254 No one... anyone..... :-) its driving me nuts.... too slow!

RichardS
User avatar
By Vicne
#56267 Not sure I understand what you aim to do...
Could you share some code that exhibits the problem ?
Kind regards,
Vicne
User avatar
By martinayotte
#56278 To my knowledge, SPIFFS slowness should be seen only when FS is too fragmented and almost full, or maybe when existing files are overwritten with new content, or maybe when file count becomes so huge.

How many files do you have ?
Are you writing data block by block or char by char ?

Did you tried some test sketch where files are added sequentially to see if newly added file gradually takes more time to be written ?