diff options
author | stephan <stephan@noemail.net> | 2022-10-04 09:12:05 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-10-04 09:12:05 +0000 |
commit | c7fb48d4b6144b0f89fe05e7790c0e8d309494a3 (patch) | |
tree | 053b3c64eb6b82422c194436e883bc3aa358a581 /ext/wasm/api/sqlite3-api-opfs.js | |
parent | f6b6188bdd930921257a72ea3eab99160120040f (diff) | |
download | sqlite-c7fb48d4b6144b0f89fe05e7790c0e8d309494a3.tar.gz sqlite-c7fb48d4b6144b0f89fe05e7790c0e8d309494a3.zip |
OPFS async proxy: add a wait-and-retry policy to the get-sync-handle step to help account for cross-tab locking.
FossilOrigin-Name: 45c48c63d311052105d102189208495b2b53fa3c4174884ecf63b757aa4016e5
Diffstat (limited to 'ext/wasm/api/sqlite3-api-opfs.js')
-rw-r--r-- | ext/wasm/api/sqlite3-api-opfs.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ext/wasm/api/sqlite3-api-opfs.js b/ext/wasm/api/sqlite3-api-opfs.js index 7b85ac06c..90f161680 100644 --- a/ext/wasm/api/sqlite3-api-opfs.js +++ b/ext/wasm/api/sqlite3-api-opfs.js @@ -915,9 +915,19 @@ const installOpfsVfs = function callee(asyncProxyUri = callee.defaultProxyUri){ opfsUtil.OpfsDb.prototype = Object.create(sqlite3.oo1.DB.prototype); sqlite3.oo1.dbCtorHelper.setVfsPostOpenSql( opfsVfs.pointer, - /* Truncate journal mode is faster than delete or wal for - OPFS, per speedtest1. */ - "pragma journal_mode=truncate" + [ + /* Truncate journal mode is faster than delete or wal for + this vfs, per speedtest1. */ + "pragma journal_mode=truncate;", + /* + This vfs benefits hugely from cache on moderate/large + speedtest1 --size 50 and --size 100 workloads. We currently + rely on setting a non-default cache size when building + sqlite3.wasm. If that policy changes, the cache can + be set here. + */ + //"pragma cache_size=-8388608;" + ].join('') ); } |