-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asincify version of SQL.js (no COOP required!) #59
Comments
Yep, you are right 🙂. Just want to point, that there is another way to achieve a good sqlite performance with asyncify version of SQLite (if I am not wrong with benchmarking!). And I think it is related to absurd-sq somehow, because James wrote at article:
At https://jlongster.com/future-sql-web. It also definitely bloats the size, but brotli version has not so much size difference. I took Oz version of sql.js, and wa-sqlite (which is already Oz) and made brotli of them: The difference is ~60kb. |
I was able to achieve the same performance as
absurd-sql
has, 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-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 ofwa-sqlite
😅The text was updated successfully, but these errors were encountered: