diff options
author | stephan <stephan@noemail.net> | 2022-09-19 17:09:09 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-09-19 17:09:09 +0000 |
commit | f815011a085e86117da3e28f8281fb13cf1bcdf9 (patch) | |
tree | a408bdfa2cb7c04f6ddd7bb1571e3bed92aa8b39 /ext/wasm/sqlite3-opfs-async-proxy.js | |
parent | 61418d5a679f11bbf3517431777c14b30252bd75 (diff) | |
download | sqlite-f815011a085e86117da3e28f8281fb13cf1bcdf9.tar.gz sqlite-f815011a085e86117da3e28f8281fb13cf1bcdf9.zip |
Cut the speedtest1 runtime of the OPFS VFS proxy by approximately 3/4ths via xRead/xWrite buffer-copying optimizations. Still slower than the WASMFS impl by approx. 1/5th.
FossilOrigin-Name: fb7f287310d74a3e236125ae9c49b859f9263c29ae85161c1bcf9dd0778d8a51
Diffstat (limited to 'ext/wasm/sqlite3-opfs-async-proxy.js')
-rw-r--r-- | ext/wasm/sqlite3-opfs-async-proxy.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/wasm/sqlite3-opfs-async-proxy.js b/ext/wasm/sqlite3-opfs-async-proxy.js index 634659c73..73bfad9d8 100644 --- a/ext/wasm/sqlite3-opfs-async-proxy.js +++ b/ext/wasm/sqlite3-opfs-async-proxy.js @@ -60,6 +60,7 @@ const logImpl = (level,...args)=>{ const log = (...args)=>logImpl(2, ...args); const warn = (...args)=>logImpl(1, ...args); const error = (...args)=>logImpl(0, ...args); +const metrics = Object.create(null); warn("This file is very much experimental and under construction.", self.location.pathname); @@ -220,7 +221,7 @@ const vfsAsyncImpls = { let sz; try{ sz = await fh.accessHandle.getSize(); - fh.sabViewFileSize.setBigInt64(0, BigInt(sz)); + fh.sabViewFileSize.setBigInt64(0, BigInt(sz), true); sz = 0; }catch(e){ error("xFileSize():",e, fh); |