Open nkovacs opened 9 years ago
Whether sqlite supports multi-threading depends on how it was compiled. The safe assumption is that it was compiled without multi-threading support, especially given the fact that the go-sqlite3 is not vendored in go-mapnik and hence it's compile options might change.
Having said that, I agree that the current code is not optimal. I have noticed you already starting hacking around in a fork of yours. I'll be happy to take in a pull request and collaborate with you on improving things.
There's only a single goroutine that serves reads from the mbtiles database. This is very slow, especially since the reads are blocking. m.fetch should run in a goroutine. Similarly m.insert should also be executed in a goroutine. Sqlite should be able to handle locking.