Recompact strategy


Hi everyone,
I’m constructing a circular buffer of flash mem locations using up 4MB of the on-board flash. Once this becomes full, after every new entry for logging, I have to delete the old entry and recompact, then write the new one.
How long roughly will the recompact take? Seconds like the format?
Would I be better off deleting 10, then recompacting, or 100 say so that the overall recompact overhead is reduced. (Obviously my buffer max size reduces in this case). If I delete 100 will the recompact take longer?
I may have data coming in quite quickly at times and I don’t want to be stuck in the recompact for too long and risk loosing data. (I know I have to watch out for the watchdog too on long recompacts!)


Do you use A&D cell as flash storage? The recompacting procedure is very long for A&D storage. Roughly 10 seconds as I’ve seen during DOTA.


Sorry, yes I should have made it clear its A&D storage I am using to get the large storage area.

10 secs! Ouch. I’ll have to think about this carefully then and make sure I have enough buffering on my input stream.
Is the recompact time dependant on the number of cells deleted?