fix: batch standings updates to eliminate N+1 queries in recalculate (#75) #93

Open
Claude wants to merge 1 commits from issue/75-fix-n-1-query-pattern-in-standings-recalculation into main

1 Commits

Author SHA1 Message Date
Cal Corum
d3b9355f26 fix: batch standings updates to eliminate N+1 queries in recalculate (#75)
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m54s
Replace per-game update_standings() calls with pre-fetched dicts and
in-memory accumulation, then a single bulk_update at the end.
Reduces ~1,100+ queries for a full season to ~5 queries.

Closes #75

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 03:37:45 -05:00