← Back to context

Comment by Waterluvian

3 days ago

This is probably a good example of the opposite. It would be a mistake to design for the fleetingly rare case. If you’re dealing with a handful of extensions, a json file that’s rewritten is fine.

But the software already has multiple database systems built in. There's not exactly overhead to use what plumbing is already there, instead of writing to disk.

  • Firefox is absolutely abysmal at not corrupting its JSON stores, too. I've had it crash and lose tabs so many times. Perhaps moving back to SQLite wouldn't be a bad idea.

    I had to recover somebody's bookmarks for them recently after it decided to destroy the main copy.

    • The SQLite parts that exist in Firefox right now are no less fiddly. If you crash the thing and the journal files are still there, it starts back up and presents you with a blank profile. Absolutely horrifying if you don't know about this quirk (and about the fact that you can go in and delete those even after such a restart happens).

In an ideal world, software with 100 million users would be optimised for energy usage. It all adds up. This does pale in comparison to everything else, though.