Repository navigation
perf: the analysis chart loads after the page - #331
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
recharts and its d3 helpers (~320 KB of JavaScript, the largest part of the analysis page's) were in the page's start-up code for one chart in the sidebar, below the board on phones. The chart (MovesByRatingArea) now loads with next/dynamic once MovesByRating renders; the panel and its heading draw at once and a placeholder holds the chart's place. The same goes for puzzles, drills, broadcasts and the home page's sections, which use the same component. Its test renders the chart directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ashtonanderson
force-pushed
the
claude/perf-round-7
branch
from
November 3, 2026 06:22
9781b24 to
eeefeca
Compare
ashtonanderson
force-pushed
the
claude/perf-round-8
branch
from
November 3, 2026 06:22
56a1767 to
1bb0495
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Eighth round: the analysis page's Moves by Rating chart loads after the page instead of with it. Stacked on #329 (
claude/perf-round-7); this PR's base is that branch. Details are inLOADING.md("Round 8").Change (c16c4fa)
MovesByRatingArea) now loads withnext/dynamiconceMovesByRatingrenders. The panel and its heading draw at once, and a placeholder of the chart's height holds its place.MovesByRating's test renders the chart directly through a mockednext/dynamic, and still checks that the chart redraws only when its moves change.Results (round 7 → this branch)
Local builds. The phone is Chrome's 4x CPU throttling with 4G. 5 runs each, builds alternating.
Lighthouse (phone settings, local builds, 3 runs each):
Lighthouse's main content is the board in both builds. Its runs overlap: 2.45–3.91 s before, 2.60–3.44 s after.
Stockfish
Checked with
scripts/perf/chart-probe.mjson the analysis page, 8 steps per run, each pair run in both orders.On the phone the build run first in a pair comes out slower:
That's why the order is balanced.
Testing
npm test(89, with main's),npx tsc --noEmitandnpm run lintpass, rebased on main after Capture PostHog web vitals again #330 and Track what visitors do, and stop losing events #332.🤖 Generated with Claude Code