Comment by layer8
14 hours ago
> I did some research to find why this took so long. 13 years ago, extensions.json used to be extensions.sqlite. Nowadays, extensions.json is serialized and rewritten in full on every write debounced to 20 ms, which works fine for 15 extensions but not 84,194.
Occasionally, databases are useful. ;)
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.
1 reply →
Easier for a user to edit.
1 reply →
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.