mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 23:00:16 +00:00
fd9e89f565
Wrapped blocking file I/O and CPU-bound operations with asyncio.to_thread() to prevent blocking the event loop: - about.py: stats() and cross_references_index() now compute in thread pool (extensive JSON loading and iteration) - commentary.py: commentary_index() file I/O in thread pool - misc.py: OG image fallback read_bytes() in thread pool These routes perform heavy file I/O (reading 66+ JSON files, iterating 31k verses) which would block all other requests if run in the async context directly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>