{"slug": "stagas-huge-refactor-today-moved-from-sync-sqlite-to-worker-based-touched-88-pre", "title": "@stagas: Huge refactor today, moved from sync SQLite to Worker based, touched 88 files, pre-#AI it would have taken a week or so, finished now in ~1:30h.", "summary": "Developer @stagas completed a major refactor of an unspecified project, moving from synchronous SQLite to a Worker-based asynchronous database, touching 88 files in about 1.5 hours, a task he estimates would have taken a week before AI assistance. He credited AI for both the speed and his confidence in the correctness of the change, though he acknowledged possible bugs. The refactor was motivated by dropped requests caused by SQLite blocking the main thread.", "body_md": "Huge refactor today, moved from sync SQLite to Worker based, touched 88 files, pre-\n\nit 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\n\n[@stagas](/u/stagas?from=%2Fpost%2F1734%23post-1744)\n\n[86 notes](/u/stagas?from=%2Fpost%2F1734%23post-1744)\n\n[340 replies](/u/stagas?tab=replies&from=%2Fpost%2F1734%23post-1744)\n\n[33 tags, 216 users following](/u/stagas?tab=following&from=%2Fpost%2F1734%23post-1744)\n\n[77 followers](/u/stagas?tab=followers&from=%2Fpost%2F1734%23post-1744)|\\__/,| (`\\\n\n[creative technologist](https://github.com/stagas)\n\n[GitHub](https://github.com/stagas)_.|o o |_ ) ) creator of textlog -(((---(((--------\n\n**stagas - Overview** stagas has 462 repositories available. Follow their code on GitHub.[#open_source](/tag/open_source?from=%2Fpost%2F1734%23post-1744)\n\n[14 notes](/tag/open_source?from=%2Fpost%2F1734%23post-1744)\n\n[29 followers](/tag/open_source?tab=followers&from=%2Fpost%2F1734%23post-1744)\n\n[enter to follow](/enter)\n\n[#cats](/tag/cats?from=%2Fpost%2F1734%23post-1744)\n\n[1 note](/tag/cats?from=%2Fpost%2F1734%23post-1744)\n\n[1 follower](/tag/cats?tab=followers&from=%2Fpost%2F1734%23post-1744)\n\n[enter to follow](/enter)\n\n[enter to follow](/enter)\n\n[enter to reply](/enter?next=%2Fpost%2F1744%3Freply%3D1%26from%3D%252Fpost%252F1734%2523post-1744)\n\nSQLite 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.", "url": "https://wpnews.pro/news/stagas-huge-refactor-today-moved-from-sync-sqlite-to-worker-based-touched-88-pre", "canonical_source": "https://textlog.cc/post/1734", "published_at": "2026-08-18 11:10:52+00:00", "updated_at": "2026-08-18 12:13:08.292104+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence"], "entities": ["@stagas", "SQLite", "Worker"], "alternates": {"html": "https://wpnews.pro/news/stagas-huge-refactor-today-moved-from-sync-sqlite-to-worker-based-touched-88-pre", "markdown": "https://wpnews.pro/news/stagas-huge-refactor-today-moved-from-sync-sqlite-to-worker-based-touched-88-pre.md", "text": "https://wpnews.pro/news/stagas-huge-refactor-today-moved-from-sync-sqlite-to-worker-based-touched-88-pre.txt", "jsonld": "https://wpnews.pro/news/stagas-huge-refactor-today-moved-from-sync-sqlite-to-worker-based-touched-88-pre.jsonld"}}