Skip to content
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

Is wa-sqlite-web-backend supported? #130

Open
kasual1 opened this issue Jan 12, 2023 · 6 comments
Open

Is wa-sqlite-web-backend supported? #130

kasual1 opened this issue Jan 12, 2023 · 6 comments

Comments

@kasual1
Copy link

kasual1 commented Jan 12, 2023

I'm wondering whether I can use wa-sqlite-web-backend instead of absurd-sql-backend already. I haven't found anything related in the docs. If you need a helping hand, let me know.

Also: what are the current benefits of using wa-sqlite-web-backend? Is there a performance gain?

Thanks for building kikko! Integration with absurd worked very well.

@quolpr
Copy link
Contributor

quolpr commented Jan 13, 2023

@kasual1 here you can check the difference kikko-land/wa-sqlite-web-backend#35 .

Currently, wa-sqlite backend could not work correctly. I need some time to polish the new backend API, and then I will fix wa-sqlite backend. Or if you need wa-sqlite integration by now, I can fix it 🙂

@kasual1
Copy link
Author

kasual1 commented Jan 13, 2023

@quolpr Thanks Sergey for your response!
No there is no need to fix it immediately.
I can stick with absurd-sql for now and make the switch as soon as you're ready. Due to your implementation it's really easy to switch backends, thanks for that!

I'm rather curious whether using wa-sqlite-web-backend would increase performance of mass insertion, compared to absurd-sql. I'm working on a performance critical app and need to know if the switch to wa-sqlite could improve my current insertion speed.

@quolpr
Copy link
Contributor

quolpr commented Jan 13, 2023

@kasual1 as for the performance, absurd-sql will always be the fastest because it doesn't use asyncify 🙂

@stereosteve
Copy link

@quolpr on a related note are there plans to add backend for the official sqlite wasm build?

https://sqlite.org/wasm/doc/trunk/about.md

While OPFS is not yet everywhere... it seems to address most of the concerns from the absurd-sql POC.

@quolpr
Copy link
Contributor

quolpr commented Jan 26, 2023

@stereosteve good idea, created issue #137

@quolpr
Copy link
Contributor

quolpr commented Mar 27, 2023

Since wa-sqlite is under MIT now, I moved wa-sqlite to this monorepo & adopted to new backend API. The next step will be to update Doc and deprecate absurd-sql adapter

Here how you can use wa-sqlite:
https://github.com/kikko-land/kikko/blob/main/packages/vite-react-example/src/list/AppList.tsx#L31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants