perf: parallelize scout opportunity creation and remove sleep(2) #101
Labels
No Label
ai-changes-requested
ai-failed
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
ai-working
bug
enhancement
feature
in-queue
performance
security
tech-debt
todo
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-discord#101
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
In
open_st_pr_packs()(helpers/main.py~line 1796-1803), after cards are displayed, scout opportunities are created one at a time with a 2-secondasyncio.sleep()between each pack:For 5 packs this adds ~8 seconds of intentional delay after the user already sees their cards.
Proposed Fix
asyncio.gather()to create all scout opportunities simultaneouslyasyncio.sleep(2)— investigate why it was added (rate limiting? race condition?) and address the root cause insteadImpact
Eliminates ~8 seconds of post-display delay for 5-pack opens. Lower priority since it happens after cards are shown, but still a noticeable UX drag.