NewThis is a live doc! Anyone with edit access can make updates in real time without having to publish.
wa-sqlite

PowerSync 内部使用了 wa-sqliteIDBBatchAtomicVFS 实现,数据存储在了 IndexedDB 内

官方对于选择的解释为:

Right now, I’d (still) recommend wa-sqlite’s IDBBatchAtomicVFS for most use cases - it has good performance, supports concurrent reads, has wide browser support, and is a fairly mature implementation.

If supporting older browser versions is not required and performance is critical, wa-sqlite’s current AccessHandlePoolVFS is a good option. The lack of concurrency could be an issue for some use cases, but the increased performance makes up for it. SQLite’s opfs-sahpool should have similar advantages.

The SQLite WASM - OPFS build is also an option with good performance and with file system transparency. I would not recommend it over the wa-sqlite builds yet due to the restrictions around COOP and COEP headers, unless file system transparency is an important requirement.

When stable, the new wa-sqlite AccessHandlePoolVFS could be a great option, especially on Chrome where readwrite-unsafe is supported.