Hacker News new | ask | show | jobs
by DylanSp 951 days ago
I've been wondering how well Electric's been working for people ever since I heard about it; good to hear that it's been useful for you.

Couple of questions:

- How big is the WASM blob that you need to ship for in-browser SQLite? Have you had any noticable issues from shipping a large payload to the browser?

- What are you using to persist the SQLite database on clients? Have you been using the Origin Private File System?

1 comments

This is the WASM blob and it's 1.1 MB uncompressed. https://github.com/rhashimoto/wa-sqlite/blob/master/dist/wa-.... No issues - it's cached by cloudflare.

We're using IndexedDB. Here's a writeup on alternatives https://github.com/rhashimoto/wa-sqlite/issues/85 and a benchmark https://rhashimoto.github.io/wa-sqlite/demo/benchmarks.html

Gotcha, interesting. 1.1 MB isn't too bad, especially with Cloudflare providing a local PoP. And if this is for Hocus, I'm guessing your frontend isn't used much on mobile devices with iffy connections.

That writeup on different SQLite VFS's for in-browser use is helpful, thanks for linking that.