@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. 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. 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 /tag/open source?from=%2Fpost%2F1734%23post-1744 14 notes /tag/open source?from=%2Fpost%2F1734%23post-1744 29 followers /tag/open source?tab=followers&from=%2Fpost%2F1734%23post-1744 enter to follow /enter cats /tag/cats?from=%2Fpost%2F1734%23post-1744 1 note /tag/cats?from=%2Fpost%2F1734%23post-1744 1 follower /tag/cats?tab=followers&from=%2Fpost%2F1734%23post-1744 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.