Skip to content

Let community stats combine player count and skill brackets#585

Open
ptrlrd wants to merge 1 commit into
mainfrom
feat/community-stats-composite-brackets
Open

Let community stats combine player count and skill brackets#585
ptrlrd wants to merge 1 commit into
mainfrom
feat/community-stats-composite-brackets

Conversation

@ptrlrd

@ptrlrd ptrlrd commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Adds the player×skill combine to /community-stats — you can now pick a player count AND a skill tier together (e.g. Solo + A10), instead of only one. Same UX as the tier list (#575).

What it does

  • Community blob now carries the composite brackets (solo:wr50, ...) alongside the single ones. The community BracketFilter switches to composite mode (two combinable rows), and the endpoint accepts the composite values. normalizeBracket/bracketParam already pass composites through (Let the tier list combine player count and skill brackets #575).
  • Snapshot version → 14 (additive; forces a rebuild to populate the new brackets).
  • Verified locally: the walk populates the community composites end to end (e.g. community[solo:a10] = 56 runs, a subset of solo's 110).

Bundled: cut the rebuild frequency (important)

The snapshot walk reads every run blob — ~750k files, ~80 min on the current box. The rebuild interval was 10 minutes, so the leader was walking almost continuously (one worker pegged + a full run/file scan back-to-back), which starves Mongo and is a big part of the site-wide slowness (14s run lists). Bumped the rebuild interval from 10 min → 2 hours. These stats don't need minute-fresh data, and this offsets the slightly heavier community blob. It's in the same PR because it edits the same file — deploying the feature without it would make the walk-load worse.

Heads-up on deploy

The version bump means one more ~80-minute uninterrupted rebuild after deploy before the community composites populate (and, as we saw tonight, don't redeploy mid-walk or it restarts). The proper long-term fix is making that 80-min walk faster — a separate project.

ruff + compile clean; frontend is a one-prop add on the existing composite-capable BracketFilter.

Add the player x skill composite brackets (solo:wr50, ...) to the community blob
so /community-stats can combine both axes at once, like the tier list, instead of
picking only one. The community BracketFilter switches to composite mode; the
endpoint accepts the composite bracket values. Snapshot version -> 14 (additive).

Also cut the snapshot rebuild frequency: the walk reads every run blob (~750k
files, ~80 min on the current box), so the 10-minute rebuild interval had the
leader walking almost continuously, starving the DB and slowing the whole site.
These stats don't need minute-fresh data, so rebuild every 2 hours instead. This
matters more now that the community blob is a bit heavier.
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