←back to thread

Sqlite3 WebAssembly

(sqlite.org)
506 points whatever3 | 1 comments | | HN request time: 0.199s | source
Show context
TiredGuy ◴[] No.41851263[source]
So after downloading from the official downloads page and stripping away all the mjs files and "bundler-friendly" files, a minimal sqlite wasm dependency will be about 1.3MB.

For an in-browser app, that seems a bit much but of course wasm runs in other places these days where it might make more sense.

replies(8): >>41851337 #>>41851618 #>>41851622 #>>41851724 #>>41851840 #>>41852258 #>>41854092 #>>41855860 #
flockonus ◴[] No.41851618[source]
It's a good consideration, together with the fact browsers already have IndexedDB embedded. One use case still for in-browser apps like Figma / Photoshop-like / ML apps, where the application code and data is very big anyway, 1.3Mb may not add that much

Also worth considering parsing of wasm is significantly faster than JS (unfortunately couldn't find the source for this claim, there is at lease one great article on the topic)

https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_A...

replies(1): >>41851728 #
1. aidos ◴[] No.41851728[source]
When we built our frontend sync system we tried a few different options. We had a fairly simple case of just trying to store entities so we could pull incremental updates since you were last online. The one we ran in production for a while was IndexedDB but found the overhead wasn’t worth it.

I played around with warm sqlite too. That was really nice but I decided against it due to the fact that it was totally unsupported.