KurtE
Senior Member+
Many pages/posts back :
seems to be the early posts for noting and code for skipping the Always Erase/Formatting before write resulting in the net 5X faster write throughput. Paul has implemented the blockIsBlank() code to read the block and skip formatting when it is already 0xff's at the time cost of us's not ms's - perhaps that isn't working as expected as it should when Media start with full LLformat already done for First Use?
... been an ongoing thing I've evolved some - but it is an invasive set of changes that needs to evolve/invade more for total integration if it is to work.
So far the only place I see the function blockIsBlank is called is in the function: LittleFS::lowLevelFormat
I have not completely instrumented the code yet, but my guess is that each time the code completes a 4k chunk, it probably calls in lfs.c
the function lfs_file_write calls the function lfs_ctz_extend which finds a block and appears to alwasy call lfs_bd_erase
Which calls through the FS to erase.
It would be great to bypass this if possible.