1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

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
This commit is contained in:
stephan
2022-09-19 17:09:09 +00:00
parent 61418d5a67
commit f815011a08
7 changed files with 107 additions and 27 deletions

View File

@ -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);