diff options
author | stephan <stephan@noemail.net> | 2022-11-26 15:24:58 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-11-26 15:24:58 +0000 |
commit | 4245667e3562bee7c3c4fd68ddc2f7c1589d42c0 (patch) | |
tree | fc0723982ee3f95ae7c711e44d7b765c1a0f575f /ext/wasm/api/sqlite3-api-oo1.js | |
parent | 902ea8392536b729c4c4553613dae9f65a4c1bf3 (diff) | |
parent | df5d06d03eca407aa84f12fce477a0c210bc4375 (diff) | |
download | sqlite-4245667e3562bee7c3c4fd68ddc2f7c1589d42c0.tar.gz sqlite-4245667e3562bee7c3c4fd68ddc2f7c1589d42c0.zip |
OPFS VFS: add the opfs-unlock-asap=1 URI flag which tells the VFS to release implicit locks ASAP instead of during VFS idle time. This improves concurrency notably in the test app but brings a significant performance penalty in speedtest1 (roughly 4x slowdown). This is not the final word in OPFS concurrency, but gets us a step further.
FossilOrigin-Name: 9542f9ce9e023b489e2d93661f719fb0751c1e28f72fded9d3c2156d5777e7b1
Diffstat (limited to 'ext/wasm/api/sqlite3-api-oo1.js')
-rw-r--r-- | ext/wasm/api/sqlite3-api-oo1.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/wasm/api/sqlite3-api-oo1.js b/ext/wasm/api/sqlite3-api-oo1.js index fc0f7372b..9544a96c6 100644 --- a/ext/wasm/api/sqlite3-api-oo1.js +++ b/ext/wasm/api/sqlite3-api-oo1.js @@ -201,9 +201,8 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ */ dbCtorHelper.normalizeArgs = function(filename=':memory:',flags = 'c',vfs = null){ const arg = {}; - if(1===arguments.length && 'object'===typeof arguments[0]){ - const x = arguments[0]; - Object.keys(x).forEach((k)=>arg[k] = x[k]); + if(1===arguments.length && arguments[0] && 'object'===typeof arguments[0]){ + Object.assign(arg, arguments[0]); if(undefined===arg.flags) arg.flags = 'c'; if(undefined===arg.vfs) arg.vfs = null; if(undefined===arg.filename) arg.filename = ':memory:'; |