You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For redesign of SQLite plugin for Apache Cordova (#3), I would like to start evaluating whether or not to consider using WAL (https://www.sqlite.org/wal.html).
Use case: I think the primary benefit of WAL would be to alleviate possible blocking between writer(s) and readers, under the following kinds of circumstances:
Custom native Cordova plugin does read or write access, parallel to JavaScript
JavaScript code can initiate parallel read and write access, from different modules for example. (It should not be very hard to imagine multiple JavaScript modules starting multiple read and write operations in parallel, given that JavaScript was designed to be event-driven from its very beginning.) Discussed in the past here: Parallel database access handles litehelpers/cordova-sqlite-evmax-ext-workers-legacy-build-free#8
To keep the comparison as fair as possible, I would like to add that semantics of VACUUM (https://sqlite.org/lang_vacuum.html), where space for deleted data is not always cleaned up right away, seems to apply with and without WAL. But without WAL, SQLite would keep the deleted data pages in some kind of a "free list" where they could be used again. My understanding is that there are multiple forms of "auto vacuum", but a full "manual" vacuum would be better.
For redesign of SQLite plugin for Apache Cordova (#3), I would like to start evaluating whether or not to consider using WAL (https://www.sqlite.org/wal.html).
Use case: I think the primary benefit of WAL would be to alleviate possible blocking between writer(s) and readers, under the following kinds of circumstances:
Major drawbacks (as discussed in storesafe/cordova-sqlite-storage#643 (comment) and storesafe/cordova-sqlite-storage-help#10):
Major advantages of using WAL (from storesafe/cordova-sqlite-storage-help#10):
I discovered some more resources from: https://www.google.com/search?q=how+does+sqlite+checkpoint+work
At this point I think that using WAL should be optional and should come with some warnings.
The text was updated successfully, but these errors were encountered: