ncruces / go-sqlite3

Go bindings to SQLite using wazero
https://pkg.go.dev/github.com/ncruces/go-sqlite3
MIT License
500 stars 15 forks source link

Slow Latency on First Query #31

Closed JonathanHope closed 1 year ago

JonathanHope commented 1 year ago

Love the idea behind this!

I've noticed some surprising latency the first time a query is run (db.Query). On my machine it takes about 400ms. Every call to db.Query afterwards returns in comparable time to other drivers.

It's like there is some kind of expensive one time setup that occurs at that point. I don't know if this is expected behavior or not.

Thanks!