Lighter list presenter for /api/subjects (performance, future) #11
Labels
No labels
bug
ci-cd
duplicate
enhancement
help wanted
layout
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lvl0/rater#11
Loading…
Reference in a new issue
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?
Low priority — note for later.
SubjectPresenter::present()currently expands all ratings and computes aggregates for both the list endpoint (GET /api/subjects) and the detail endpoint (GET /api/subjects/{id}). This means the map-load fetches every rating for every subject just to draw pins — fine at current scale, wasteful as data grows.Scope: Add a lighter
presentForList()method toSubjectPresenterthat returns only the fields needed for map pins (id, name, lat, lng) without expanding ratings. Use it in theindexaction; keep the fullpresent()for theshowaction.Size: small