perf: offload virtual repo merge to thread pool via asyncio.to_thread #38
Reference in New Issue
Block a user
Delete Branch "benvin/issue-35-thread-pool-merge"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #35
Summary
handler.merge(...)inawait asyncio.to_thread(...)so the CPU-bound YAML parse/merge/dump runs in the thread pool instead of blocking the event loophandle()dispatch site — applies to all current and future_VirtualHandlerimplementations without modificationexamples/single-file/remotes.yamlwherebase_urlandpackagekeys were merged onto a single line, preventingdocker-compose upfrom starting the appMeasured performance gain
19-member
helm-allvirtual repo, single uvicorn worker, cache miss (38s merge):/healthlatencyTest plan
make test)/healthchecks measured — all <65ms