Replace per-row PitchingCardRatings lookup with batched fetch in pitcher sort #19
Labels
No Label
ai-changes-requested
ai-failed
ai-merged
ai-pr-opened
ai-reviewed
ai-reviewing
ai-reviewing
ai-working
bug
enhancement
evolution
performance
phase-0
phase-1a
phase-1b
phase-1c
phase-1d
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-database#19
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?
`app/routers_v2/teams.py:600-614` and `679-693`. `get_total_ops` called via `DataFrame.apply` executes two queries per row. 30 rows = 60 queries.
Priority: medium
Fixed in PR #44: #44
Both
sort_pitchersandsort_startersnow fetch allPitchingCardRatingsfor the batch of card IDs in a single query, building a(pitchingcard_id, vs_hand) → ratingdict. Theapplyclosure does O(1) dict lookups instead of 2 queries per row, reducing 2N queries to 1.