Global Feed Post Login
Replying to Avatar fiatjaf

Everything in browsers is stupid and awful. IndexedDB is implemented on top of SQLite for Firefox, I think, which makes it completely insane.

And on Chrome it's on a pile of JS on top of LevelDB which is already much slower than something like LMDB, but I don't know what I'm talking about.

Apparently the biggest issue (for reads) is that for iterating you have to switch on every row between native code and JS code. That gets much better if you fetch stuff in batches.

Also storing (and reading too, apparently) JS objects is much slower than storing JSON strings, because the act of deep copying objects and then encoding/decoding them is magnitudes slower than the superfast JSON.stringify/parse of browsers.

Avatar
rkfg 5mo ago

NoSQL database implemented on top of an SQL database is a fantastic engineering joke but it's truly puzzling how it made it into production. I had to manually vacuum it so that my app stops killing my HDD even after I cleared the IDB completely. There are many reasons Firefox sucks but this one is also funny.

Reply to this note

Please Login to reply.

Discussion

No replies yet.