Huge refactor today, moved from sync SQLite to Worker based, touched 88 files, pre- it would have taken a week or so, finished now in ~1:30h. And I wouldn’t have the confidence I have now that it went correct. It went well, though a bug or two might surface, we’ll see.
SQLite is embedded in the main thread same as the HTTP server. I noticed some requests dropping and because the queries have become more complex I figured it has to do with SQLite blocking for too much time. Moving it to a Worker makes the DB asynchronous and bypass this problem.
