Conversation
The landing page skeleton was an empty spinner, causing Lighthouse Speed Index to score 0 (7.8 s) while WASM downloaded. Replaced it with a static SVG that mirrors the exact PEGrid layout (4×4 cells at the same CELL/GAP/offsets and CSS color vars) so the page is visually complete at FCP (~0.8 s). Also added opt-in preloadWasm prop to Layout.astro to emit <link rel="preload" as="fetch"> for tiny_tpu.wasm on WASM-using pages, starting the binary download earlier during HTML parse. Affected: LandingEmbed.tsx, Layout.astro, index.astro, app.astro
perf(web): fix Lighthouse Speed Index — replace spinner with SVG PE-grid skeleton
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
LandingEmbedwith a static SVG that mirrors the exactPEGridlayout (4×4 cells, sameCELL/GAP/offset constants, same CSS color vars) — page is visually complete at FCP (~0.8 s) instead of after WASM loads (~7–8 s)preloadWasmprop toLayout.astrothat emits<link rel="preload" as="fetch" href="/tiny_tpu.wasm">to start the binary download during HTML parse rather than after React hydrationweb/.gitignoreto exclude the.vercellocal-link directorymainand PRs targetingdevormainWhy
Lighthouse Speed Index scored 0 (7.8 s) on the first deploy because the skeleton left the hero section visually empty while WASM downloaded. All other metrics (FCP, LCP, TBT, CLS, TTI) were already excellent. This change makes the page appear complete immediately at FCP, targeting Speed Index ≤ 1.5 s and overall Performance ≥ 90.
Test plan
/— Performance ≥ 90, Speed Index ≤ 2 spnpm lint && pnpm typecheck && pnpm build— all clean