Push limit/offset to the database in PlayerService.get_players
#37
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#37
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/services/player_service.py:139-148— Full result set is materialized into a Python list before pagination. All players are fetched and serialized before the list is sliced. Should apply.limit()and.offset()at query level.Priority: medium | Labels: performance
Fixed in PR #43.
Approach: In
PlayerService.get_players, the pagination logic now branches on query type:query.count()for total count, then applies.offset()/.limit()at the DB level before materializing results — no full result set is ever loaded into memory.InMemoryQueryResult): retains the existing Python list slicing (unchanged behavior for tests).