• How about having the last line in its own"staging" file?
    All lines but one are in a StorageFile, last line is in a normal file. When editing or replacing the last line, just replace the normal file. On adding a line append the already stored line from the staging file to the StorageFile and write the new line to the staging file.
    That should save both on CPU cycles and flash writes.

About

Avatar for halemmerich @halemmerich started