Origin Private File System #44
Replies: 3 comments 8 replies
-
OPFS has reached the stable versions of Safari, Chrome, and Edge. The tracking bug for Firefox is here (in progress but looks a ways off). The OPFS-specific benchmark page won't work on Firefox even if OPFS support were complete because that page uses ES6 modules in a worker which is also not yet supported in Firefox (and because I'm too lazy to bundle the worker code). Hopefully both features will arrive soon. |
Beta Was this translation helpful? Give feedback.
-
Good early morning, Roy! i'm currently working on the sqlite project's WASM-related documentation (to be released soon along with v3.40) and i have been citing your work as the first known implementation of wasmified sqlite using OPFS. Insofar as you know, is that correct? |
Beta Was this translation helpful? Give feedback.
-
AFAIK, "absurd" only ever demonstrated sqlite-in-IndexedDB, not OPFS? |
Beta Was this translation helpful? Give feedback.
-
I created an example VFS for the proposed Origin Private File System API using the dependent proposal for AccessHandle. There is a benchmark page here - note that this currently works only on Safari 15.2+ running on macOS 12.2+, Chrome 102+, and Edge 102+.
My early results have the benchmarks running generally slower than IndexedDB (a lot slower for Test 1), testing mainly on Chrome Canary. Part of the reason is it looks like Chrome has made some significant performance improvements with IndexedDB because it seems a lot faster than the last time I was playing with benchmarks. Another factor is the extra work put into the IndexedDB VFS. I haven't yet considered whether these or other optimizations can be used with OPFS.
I do know that programming the OPFS VFS is a much more pleasant experience than IDB (except for the fact that AccessHandle requires a Worker). The code can be simpler and less prone to lurking bugs. Once OPFS is stable and widely supported, I think it might be the best persistence choice when performance is not the absolute priority.
Beta Was this translation helpful? Give feedback.
All reactions