Skip to content

perf(web): fix Lighthouse Speed Index — SVG PE-grid skeleton + WASM preload#16

Merged
deaneeth merged 2 commits into
mainfrom
dev
Jun 5, 2026
Merged

perf(web): fix Lighthouse Speed Index — SVG PE-grid skeleton + WASM preload#16
deaneeth merged 2 commits into
mainfrom
dev

Conversation

@deaneeth

@deaneeth deaneeth commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaced the blank spinner skeleton in LandingEmbed with a static SVG that mirrors the exact PEGrid layout (4×4 cells, same CELL/GAP/offset constants, same CSS color vars) — page is visually complete at FCP (~0.8 s) instead of after WASM loads (~7–8 s)
  • Added opt-in preloadWasm prop to Layout.astro that emits <link rel="preload" as="fetch" href="/tiny_tpu.wasm"> to start the binary download during HTML parse rather than after React hydration
  • Added web/.gitignore to exclude the .vercel local-link directory
  • Configured Vercel ignored build step: only builds on pushes to main and PRs targeting dev or main

Why

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

  • Visit https://tiny-tpu.vercel.app — hero section shows a pulsing 4×4 grid immediately on load, then transitions to the live WASM animation
  • No layout shift when WASM loads (CLS = 0)
  • Run Lighthouse on / — Performance ≥ 90, Speed Index ≤ 2 s
  • pnpm lint && pnpm typecheck && pnpm build — all clean

deaneeth added 2 commits June 5, 2026 22:44
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
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tiny-tpu Ready Ready Preview, Comment Jun 5, 2026 5:27pm

@deaneeth deaneeth added area/frontend web/ frontend changes area/landing Landing page and marketing sections enhancement New feature or request labels Jun 5, 2026
@deaneeth deaneeth self-assigned this Jun 5, 2026
@deaneeth deaneeth merged commit 641f527 into main Jun 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/frontend web/ frontend changes area/landing Landing page and marketing sections enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant