Yup, I've tested and seen WASM SQlite's slowness myself. But I don't think it's a SQLite problem per se.
I heard WebSQL, which used SQLite, was at least 10x faster than WASM SQLite. Probably even more.
I heard WebSQL, which used SQLite, was at least 10x faster than WASM SQLite. Probably even more.
The performance is very poor, perhaps 100x worse than native. It's bad enough that we only use SQLite for trivial queries. All joins, sorting, etc. are done in JavaScript.
Profiling shows the slowdown is in the JS <-> WASM interop. This is exacerbated by the one-row-at-a-time "cursor" API in SQLite, which means at least one FFI round-trip for each row.