←back to thread

Sqlite3 WebAssembly

(sqlite.org)
647 points whatever3 | 1 comments | | HN request time: 0.252s | 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 #
jsheard ◴[] No.41851622[source]
It's pretty compressible at least, sqlite3.js+wasm are 1.3MB raw but minifying the JS and then compressing both files with Brotli gets them down to 410KB.
replies(1): >>41852828 #
rmbyrro ◴[] No.41852828[source]
A lot of HTML's nowadays have 100 - 300 kb. That's only the HTML (!!).

Adding 400 for such a high quality piece of DB actually borders reasonability.

And makes me think: what the hell are frontend devs thinking!? Multiple MB's in JS for a news website. Hundreds of KB's for HTML. It's totally unreasonable.

replies(2): >>41853979 #>>41854129 #
wahern ◴[] No.41853979[source]
> what the hell are frontend devs thinking!? Multiple MB's in JS for a news website. Hundreds of KB's for HTML. It's totally unreasonable

They're thinking, "adding [some fraction of existing total payload] for such a high quality [feature] actually borders reasonability". Wash. Rinse. Repeat.

replies(2): >>41856528 #>>41858538 #
1. rmbyrro ◴[] No.41858538[source]
You're comparing 2 Mb of useless and broken animated scrolling with 400 Kb of SQLite, which tells me you have no idea what's behind SQLite's 400 kb.

High quality software is something I rarely see nowadays when browsing "modern" websites.