Repository navigation
Speed up uncached leaderboard reads and page loading - #269
Merged
Merged
Conversation
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Leaderboard detail pages could spend 10–23 seconds waiting for SQL, and every first visit downloaded a 3.66 MB uncompressed JavaScript bundle. This change makes the ranking reads use the existing covering indexes, disables per-request SQL JIT compilation, and returns account IDs directly so trend initialization no longer searches five usernames.
Split routes and the trend chart into separate bundles, include only the chart features and syntax grammars used by the site, keep navigation inside the React app, and compress scripts/styles/JSON. The entry script is now 530 KB uncompressed / 171 KB over gzip (95% less transferred). No new response cache or database schema changes; Modal and submission execution are unchanged.
Validation:
Production rollout: deployed Northflank
boardimageelfin-wing-5727, commit51dde2b, on 2026-11-04. All 42 listed leaderboard APIs returned successful results (median 0.471s, maximum 1.795s). Board 544: 10.374s → 0.662s; board 763: 23.370s → 0.917s. Production entry script: 3,657,243 bytes → 171,134 transferred bytes with gzip (95.3% reduction). Live Chrome measured the vectorsum leaderboard API at 445.7 ms and reported no console warnings/errors. Health remains healthy. No Modal or submission services were changed.