• Hi, thanks for this - those last steps are really handy - I'll see if I can reproduce.

    Actually have you tried just install default apps from the app loader, and then trying again? I guess it's possible that the Storage got corrupted somehow and this is causing continued compaction errors. Starting from scratch might help.

    StorageFile reaches a given size limit (currently 349) the content is converted to binary and moved to a fixed-length "checkpoint" file.

    While it shouldn't be the cause of your problems, I'm not sure that's actually going to be the best way of doing things. Internally Storagefile allocates a big chunk of data in order to do appends, so honestly I'd have thought you would be better off just writing to a standard 'Storage' file directly in the first place...

    Either just keep everything in RAM if possible, or maybe use Storage.write with the offset functionality: http://www.espruino.com/Reference#l_Stor­age_write

  • Actually have you tried just install default apps from the app loader, and then trying again? I guess it's possible that the Storage got corrupted somehow and this is causing continued compaction errors. Starting from scratch might help.

    Yeah I've tried that, it still gives the same errors.

    While it shouldn't be the cause of your problems, I'm not sure that's actually going to be the best way of doing things. Internally Storagefile allocates a big chunk of data in order to do appends, so honestly I'd have thought you would be better off just writing to a standard 'Storage' file directly in the first place...

    Either just keep everything in RAM if possible, or maybe use Storage.write with the offset functionality: http://www.espruino.com/Reference#l_Stor­age_write

    Hmm... I have thought about that as well. I was concerned that Storage.write() might repeatedly rewrite the same page until the 4096 bytes are filled. Is that a problem, and if it is would it be more / less of a problem than using StorageFile?

About

Avatar for Gordon @Gordon started