Skip to content
Discussion options

You must be logged in to vote

@my-lalex You can only get real concurrency with an OPFS VFS in a browser that supports the mode: 'readwrite-unsafe' option to createSyncAccessHandle(), which allows multiple open access handles on an OPFS file. As of now that would be only Chromium-based browsers.

OPFSAdaptiveVFS will use that feature if it is available. You will also need to enable shared reads when instantiating the VFS, like this (because the default lockPolicy is 'exclusive'):

const vfs = new OPFSAdaptiveVFS('my-vfs', module, { lockPolicy: 'shared' });

That's probably the easiest thing to try. That should definitely be faster to start up. I'm not sure how query performance will compare on your workload.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@my-lalex
Comment options

@rhashimoto
Comment options

@my-lalex
Comment options

Answer selected by my-lalex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants