diff options
Diffstat (limited to 'ext/wasm/api/sqlite3-api-opfs.js')
-rw-r--r-- | ext/wasm/api/sqlite3-api-opfs.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/wasm/api/sqlite3-api-opfs.js b/ext/wasm/api/sqlite3-api-opfs.js index 9588fc8a2..42c0e1166 100644 --- a/ext/wasm/api/sqlite3-api-opfs.js +++ b/ext/wasm/api/sqlite3-api-opfs.js @@ -898,8 +898,14 @@ const installOpfsVfs = function callee(asyncProxyUri = callee.defaultProxyUri){ sqlite3.oo1.dbCtorHelper.call(this, opt); }; 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" + ); } - + /** Potential TODOs: @@ -907,7 +913,6 @@ const installOpfsVfs = function callee(asyncProxyUri = callee.defaultProxyUri){ publish an interface for proxying the higher-level OPFS features like getting a directory listing. */ - const sanityCheck = function(){ const scope = wasm.scopedAllocPush(); const sq3File = new sqlite3_file(); |