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

sqlite without C #2

Open
joicemjoseph opened this issue Aug 25, 2021 · 3 comments
Open

sqlite without C #2

joicemjoseph opened this issue Aug 25, 2021 · 3 comments

Comments

@joicemjoseph
Copy link

https://gitlab.com/cznic/sqlite is a replacement for mattn's go-sqlite3 without c. can we try this out?

@subins2000
Copy link
Member

This looks interesting. Is it stable enough ? Found it has only experimental support on Windows and no 32-bit Windows support.

Also, mattn's go-sqlite3 is already packaged on Debian, very stable. https://packages.debian.org/source/stretch/golang-github-mattn-go-sqlite3

I remember there was an issue in packaging libvarnam for Debian because of SQLite dependency issue. With govarnam and mattn's sqlite (the only dependency of govarnam), packaging for Debian will be easier.

Maybe once cznic's sqlite3 becomes stable enough, we can consider a change.

@subins2000
Copy link
Member

I tried using cznic's sqlite, it's almost a drop-in replacement for mattn's go-sqlite3. Filed 1 feature request: https://gitlab.com/cznic/sqlite/-/issues/83

The resulting .so file became 7MB. Currently with cgo sqlite, it's 4MB. Also the time taken to run tests increased too. make test went to 5 seconds (currently it's 1.2s), make test-govarnamgo also went to 5 seconds (currently it's 0.5s).

So it seems there's a performance drop and filesize increase. I didn't test typing with ibus engine with it on though.

Here's the branch of my work (not pretty, was just messing with it): https://github.com/varnamproject/govarnam/tree/cznic-sqlite

@subins2000
Copy link
Member

subins2000 commented Dec 5, 2023

@anoopmsivadas says he'll take a look at this, maybe we can support both C sqlite3 and Go sqlite with a feature flag maybe? With Go sqlite it becomes possible for govarnam to be embeddable in WASM. This needs an exploration as well.

cznic's go-sqlite3 just got the ability to register connection hooks yesterday: https://gitlab.com/cznic/sqlite/-/merge_requests/63

Edit: Oops, wrong anoop tagged, sorry @anoop142

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

2 participants