2 ms·
I can't imagine someone having the chops to code up their own web framework and making a mistake like this. There must be something that we're missing. Another
by wesselbindt 2y ago
I can't imagine someone having the chops to code up their own web framework and making a mistake like this. There must be something that we're missing. Another commenter suggested that since it's SQLite, the blocking calls are quick enough not to care, which may be true. I don't know enough about SQLite's performance characteristics to judge that.
In general I assume disk I/O is slow enough (even on SSD) to care about blocking the event loop and delegating the calls to a thread. But I've been wrong about this before. For example, a call to stat is technically blocking, but the overhead of delegating it to a thread is actually more expensive (on my Framework 13) and blocks the loop longer than just doing the call outright in the main thread.
- anentropic 2y agoFWIW... CloudFlare Durable Objects rely on sync calls to SQLite being fast https://blog.cloudflare.com/sqlite-in-durable-objects/ https://blog.cloudflare.com/sqlite-in-durable-objects/