Origin Private File System #44
rhashimoto
started this conversation in
Ideas
Origin Private File System
#44
Replies
0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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+, and on Chrome 102+ (scheduled for the stable channel in May 2022).
My early results have the benchmarks running generally slower than IndexedDB (a lot slower for #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.