I was able to achieve the same performance as `absurd-sql` has, but with asincify version of SQL.js(using `wa-sqlite`). Here is the comparison: https://user-images.githubusercontent.com/7958527/179220916-6d28aaa3-9ca4-453b-bccb-677aec516b83.mp4 And, you can also run some benchmarks at https://cerulean-bublanina-96bf3a.netlify.app/ The results are roughly the same, but no COOP is required anymore! Here is the source code of backend https://github.com/trong-orm/wa-sqlite-web-backend/blob/main/src/IDBCachedWritesVFS.ts (it's a bit messy). I used the same tricks as `absurd-sql` do — don't write till transaction finish, use cursor if sequence read. The problem now is that `wa-sqlite` is under GPL3 license, so we need someone who make MIT version of `wa-sqlite` 😅
I was able to achieve the same performance as
absurd-sqlhas, but with asincify version of SQL.js(usingwa-sqlite).Here is the comparison:
example3.mp4
And, you can also run some benchmarks at https://cerulean-bublanina-96bf3a.netlify.app/
The results are roughly the same, but no COOP is required anymore!
Here is the source code of backend https://github.com/trong-orm/wa-sqlite-web-backend/blob/main/src/IDBCachedWritesVFS.ts (it's a bit messy). I used the same tricks as
absurd-sqldo — don't write till transaction finish, use cursor if sequence read.The problem now is that
wa-sqliteis under GPL3 license, so we need someone who make MIT version ofwa-sqlite😅