Skip to content

Home page performance: AWS icons on demand, hero map after load - #36

Merged
hiabhee merged 6 commits into
fix/lighthouse-homefrom
perf/home-page
Nov 10, 2026
Merged

hiabhee merged 6 commits into
fix/lighthouse-homefrom
perf/home-page

Conversation

@hiabhee

@hiabhee hiabhee commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Summary

Two home page performance fixes, measured against main, plus an SEO.md section on measuring performance. This PR's base is #35's branch, so the two SEO.md edits don't conflict. Merge #35 first; GitHub then moves this PR onto main.

  1. AWS icons load on demand (components/icons/ProviderServiceIcon.tsx). The @react-icons-cloud/aws set is about 500 icons in a single pre-bundled file that can't be tree-shaken, and it was imported statically into every canvas. On the home page that was a 241 KB chunk, 96% unused, because the hero map shows no AWS components. It now loads the first time an AWS component renders, one load shared by all of them, and the existing path glyph shows until it arrives. The editor, share and embed pages also benefit for diagrams without AWS components.
  2. The hero map starts after the page has loaded (LazyLiveMapHero.tsx). On phones the IntersectionObserver with a 200px margin fired during hydration, so the map's JavaScript competed with the first paint. When the map is only visible, it now waits for load plus requestIdleCallback. Scrolling, moving the pointer, touching or pressing a key still loads it at once.

Measurements

Local production builds of main and this branch, served the same way; Lighthouse 12 mobile, three runs each, medians.

main This branch
Unused JavaScript 292 KiB 43 KiB
Total blocking time 219 ms 177 ms
Speed Index 2,529 ms 2,347 ms
Score 84 85
LCP (simulated) 3,851 ms 3,862 ms
  • Observed LCP is 224 ms, at the first paint. The multi-second LCP is Lighthouse's simulation charging early requests against it, not a real delay.
  • Tried and dropped: experimental.inlineCss. It inlined all of the app's CSS, producing 946 KB of HTML and a score of 75.

Test plan

  • tsc clean; eslint clean on the changed files; component and icon tests pass (63)
  • Preview: open a diagram with AWS components (e.g. the Serverless template) and check the AWS icons appear shortly after the canvas loads
  • After deploy: PageSpeed Insights on /, check unused JavaScript and total blocking time

- ProviderServiceIcon imported @react-icons-cloud/aws statically: ~500
  icons in one pre-bundled file that can't be tree-shaken (241 KB, 96%
  unused on the home page). It now loads the first time an AWS component
  renders, shared by all of them, with the path glyph until then.
- LazyLiveMapHero: on phones the observer fired during hydration, so the
  map's JavaScript competed with the first paint. When it is only visible
  it now waits for the load event and requestIdleCallback; interaction
  still loads it at once.

Local production builds, 3 Lighthouse mobile runs each (medians), main vs
branch: unused JS 292 -> 43 KiB, TBT 219 -> 177 ms, Speed Index 2,529 ->
2,347 ms, score 84 -> 85. Simulated LCP unchanged (~3.85 s); observed LCP
is 224 ms, with the first paint. experimental.inlineCss was tried and
dropped (946 KB HTML, score 75).

SEO.md: section 11c (measure before optimising) and change-log rows.
@vercel

vercel Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
arch-draw Ready Ready Preview Nov 10, 2026 3:10pm UTC

@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 23d4af89-3629-45e3-995a-a407e8d94ea2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

hiabhee and others added 4 commits November 8, 2026 10:16
- Draw edges of one fan on nested 14px lanes (fanLaneSeparation) as the
  last step of optimizeEdgeRoutes.
- Treat groups as passable empty space so edges take the shortest way
  around cards only (EXP_GROUP_WALLS restores the old walls).
- Step edge labels beside the line when every spot on it covers a card.
- Give studio-minimal columns a 72px corridor (EXP_NS48 restores 48).
- Shared viewer zooms on wheel; MCP preview widget URI bumped to v3.
fix(layout): stabilize edge routing and diagram geometry
@hiabhee
hiabhee merged commit f3d5a23 into fix/lighthouse-home Nov 10, 2026
2 of 3 checks passed

This branch was successfully deployed

1 active deployment
Preview — bb823734 Deployed Nov 10, 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