Skip to content

bug: tournament page re-fetches its static half every second - #587

Merged
lukepolo merged 1 commit into
mainfrom
perf/tournament-subscription-split
Sep 19, 2026
Merged

lukepolo merged 1 commit into
mainfrom
perf/tournament-subscription-split

Conversation

@lukepolo

@lukepolo lukepolo commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

The tournament subscription pulled branding, organizers, prizes, awards and match options on every tick alongside the live data. Splits the static half into a one-shot query, merges both into a single tournament computed so children are unchanged, and refetches the static half when the status changes or an organizer edits it.

Also drops a dead captain: playerFields selection and takes elo off award rosters, which render with show-elo=false.

On prod this subscription family is 29% of top-level DB CPU across four variants.

The tournament subscription selected branding, organizers, prizes,
categories, match options, awards and award configs on every poll. The
awards branch alone drags a nested tournament_team -> roster -> player
join whose rows each cost an elo and three sanction lookups.

Moves those to a one-shot query, merged back under the live half by a
`tournament` computed so child components are unchanged. Organizer edit
surfaces inject `refetchTournamentStatic` to refresh it, and the status
watcher covers awards appearing when a tournament finishes.

Also drops two player selections nothing renders: `captain` on
tournament teams, and `elo` on award team rosters (podium hover passes
show-elo="false").
@lukepolo
lukepolo merged commit a0696ed into main Sep 19, 2026
2 checks passed
@lukepolo
lukepolo deleted the perf/tournament-subscription-split branch September 19, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant