perf: blocking synchronous file I/O on async event loop #92
Labels
No Label
ai-changes-requested
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
in-next-release
status/in-progress
status/pr-open
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-v2#92
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Problem
Synchronous
open()+json.load()/json.dump()calls block the entire event loop while waiting for disk I/O.commands/gameplay/scorecard_tracker.py—load_data()/save_data()/scorebughot pathservices/chart_service.py—_load_charts()/_save_charts()(lines 48–103)Fix
Wrap with
asyncio.to_thread():Or use
aiofilesfor a more idiomatic async approach.Impact
MEDIUM — Scorecard tracker is on the scorebug hot path (3-minute update cycle). Chart service blocks startup.