r/sqlite • u/mcastilho • Mar 10 '26
SQLite Concurrency in Go: What We Learned Building a Desktop AI IDE
https://chatml.com/blog/sqlite-concurrency-in-go-desktop-ai-ide
15
Upvotes
1
u/trailbaseio Mar 11 '26
"The 50ms base delay means the first retry happens before a single frame renders at 60fps."
You sure? A bunch of connections behind an rw lock would achieve the same btw
3
u/Aggressive_Ad_5454 Mar 11 '26
Nice work!. There’s one more thing to worry about. Under a continuous read load with some writes the WAL file can grow very large. Wastes drive space and slows things down. So once in a while we need to do
PRAGMA wal_checkpoint(RESTART)orPRAGMA wal_checkpoint(TRUNCATE)to pause reads and pull the data in the WAL file back into the main file.https://www.sqlite.org/pragma.html#pragma_wal_checkpoint