- Notifications
You must be signed in to change notification settings - Fork83
-
I note in#85@rhashimoto says "If I were forced to choose only one VFS for all browser applications, I would first grumble a lot and then grudgingly choose IDBBatchAtomicVFS". However this was quite some time ago and so given the downsides (size, performance, limited browser compatibility) of the async wasm builds I wonder if this would now change? The reason I'm asking is because I'm looking at migrating from the official sqlite wasm package over to this one. My website has quite a large install base using sqlite-wasm so the jspi build is out of the question, and the async build goes very slowly. So for me sync wasm and hence OPFSCoopSyncVFS seems a very good combination. In my testing:
So, I'm looking for reasonsnot to switch to using the sync + OPFSCoopSyncVFS version compared to other VFS or compared to the official sqlite-wasm build (eg worse browser compatibility, known corruption or other unreliability, ...) |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 2 comments 1 reply
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
No, I would still say that for the same reasons. But note that the point of that entire message is that there doesn't appear to be a VFS approach that is optimal for all use cases, and so developers should pick, modify, or write a VFS that meets the needs of their application.
There currently aren't any known issues in OPFSCoopSyncVFS. It is an out-of-the-box sort of solution, and I don't know how well exercised it has been in the real world. I am keeping my eye onthis PowerSync thread that might or might not indicate a VFS bug. UPDATE: This has been resolved and appearsnot to have been a problem with OPFSCoopSyncVFS. Finally, let me make sure you knowthis:
I have a decent record of finding and fixing bugs, but past performance is no guarantee of future results. 😀 |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
There's one little gotcha with OPFSCoopSyncVFS that I'll record here. OPFSCoopSyncVFS is filesystem transparent, which means that the database file in OPFS is a regular SQLite file that can be opened by any other SQLite program, BUT... ...If you want to open the database where it is (instead of exporting it somewhere else) - say you decide to use OPFSAdaptiveVFS instead - this will likely fail with SQLITE_CANTOPEN. The reason is that OPFSAdaptiveVFS creates some additional files in the same directory and one of them will prevent a successful open by another VFS. You can fix this by removing the file with "-wal" appended to your database filename, e.g. if your database filename is "my.db" under the root OPFS directory: awaitnavigator.storage.getDirectory().then(d=>d.removeEntry('my.db-wal')); |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
Ha! As the Berliners say: "hope is the last thing to die!" 😜
It is my sincere hope to have the presence of mind to recall that quote the next time it's relevant. |
BetaWas this translation helpful?Give feedback.