litestream icon indicating copy to clipboard operation
litestream copied to clipboard

CGOless using modernc.org/sqlite

Open gedw99 opened this issue 2 years ago • 3 comments

Anyone know if there are any blockers to use modernc.org/sqlite ?

https://pkg.go.dev/modernc.org/[email protected]

Maybe it does not have something that Litestream needs ?

  • I read on bench its slower but quite a significant factor, depending on your use case.

https://pkg.go.dev/modernc.org/sqlite?tab=importedby shows that its getting used and supported.

I searches the issues and discussions but nothing really about this.

gedw99 avatar Jul 11 '22 09:07 gedw99

I did get it going a long time ago in https://github.com/danp/litestream/tree/modernc-sqlite. Not sure how involved it would be to update but it should be easier/safer to do the necessary PRAGMAs on all connections since modernc.org/sqlite has better support for that now.

danp avatar Jul 15 '22 10:07 danp

Thanks @danp

i would still be interested in pursuing this. The only downside is the perf ; I saw benchmarks that indicated a significant perf hit with the CGOless SQLite.

Would appreciate any comments on this if anyone has any thoughts on this

gedw99 avatar Sep 03 '22 12:09 gedw99

I'm not concerned about the performance. For the application I'm working on, it would just be about the building of assets for reproducibility. Having CGO-less work means less tools to contain there.

jtarchie avatar Jan 06 '23 04:01 jtarchie