perf: parallelize get_card_embeds calls in display_cards (#98) #157

Merged
cal merged 1 commits from issue/98-perf-parallelize-get-card-embeds-calls-in-display into main 2026-04-08 10:26:06 +00:00

1 Commits

Author SHA1 Message Date
Cal Corum
2f22a11e17 perf: parallelize get_card_embeds calls in display_cards (#98)
All checks were successful
Ruff Lint / lint (pull_request) Successful in 17s
Closes #98

Replace sequential await-in-list-comprehension with asyncio.gather() so
all card embed fetches run concurrently. Cuts 50 sequential DB round-trips
(5 packs × 5 cards × 2 calls each) down to ~2 concurrent batches.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 02:32:56 -05:00