Skip to content

Undim the banner link, and keep the preview probe out of first paint - #436

Merged
singhharsh1708 merged 1 commit into
mainfrom
perf/home-blocking
Oct 3, 2026
Merged

singhharsh1708 merged 1 commit into
mainfrom
perf/home-blocking

Conversation

@singhharsh1708

Copy link
Copy Markdown
Owner

Two home page fixes, and a correction to a number I reported earlier today.

The banner's link text was text-white/85, which resolves to #d9e9fa on rgb(1,109,221): 4.01:1, under the 4.5 small text needs, and Lighthouse failed the page's colour contrast for it. At full white the same text measures 4.96:1, sampled from a strip of the banner where no text sits, and accessibility goes from 97 to 100. A test fails if the banner dims its link text again.

StylePreview finds its resting frame by drawing seven frames and reading seven of them back, inside the first paint. The landing page mounts four previews, so that was 28 synchronous getImageData calls in front of the page settling. It now paints the start of the range immediately and does the probe when the browser is idle. Measured on a local production build at 6x CPU slowdown: 90ms blocked before, 80ms after. A real improvement, and a small one.

The correction: I reported this morning that the home page scores 73 performance with 480ms blocked. Measured again just now, twice, it is 99 and 100 with 0ms blocked. The earlier runs were taken while this machine had 50 Chrome processes from my own verification work, and that contention went into the numbers rather than the page. I should have checked the conditions before calling it a product problem. Every other page measured 97 to 98 at the time, which was the clue I had and did not follow.

tsc and eslint clean, vitest 718 of 718.

@vercel

vercel Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
scrollcraft Ready Ready Preview Oct 3, 2026 2:33pm UTC

@singhharsh1708
singhharsh1708 merged commit e48c29c into main Oct 3, 2026
3 checks passed
@singhharsh1708
singhharsh1708 deleted the perf/home-blocking branch October 3, 2026 14:33

This branch was successfully deployed

1 active deployment
Preview — 678f074b Deployed Oct 3, 2026 by vercel[bot]
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