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.Good work! What motivated the refactor exactly? I'm not familiar at all with Worker
[@stagas](/u/stagas?from=%2Fpost%2F1734%23post-1744)
[86 notes](/u/stagas?from=%2Fpost%2F1734%23post-1744)
[340 replies](/u/stagas?tab=replies&from=%2Fpost%2F1734%23post-1744)
[33 tags, 216 users following](/u/stagas?tab=following&from=%2Fpost%2F1734%23post-1744)
[77 followers](/u/stagas?tab=followers&from=%2Fpost%2F1734%23post-1744)|\__/,| (`\
[creative technologist](https://github.com/stagas)
[GitHub](https://github.com/stagas)_.|o o |_ ) ) creator of textlog -(((---(((--------
stagas - Overview stagas has 462 repositories available. Follow their code on GitHub.#open_source
[enter to follow](/enter)
[enter to follow](/enter)
[enter to follow](/enter)
[enter to reply](/enter?next=%2Fpost%2F1744%3Freply%3D1%26from%3D%252Fpost%252F1734%2523post-1744)
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.