FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

MakeFaster: cut Lighthouse LCP ~73% cold / ~70% warm (6 kept experiments) by jjcm · Pull Request #1 · makefaster-dev/algorithm-visualizer · GitHub

MakeFaster: cut Lighthouse LCP ~73% cold / ~70% warm (6 kept experiments) - #1

Open
jjcm wants to merge 6 commits into
masterfrom
cursor/makefaster-lcp-loop-09db
Open

MakeFaster: cut Lighthouse LCP ~73% cold / ~70% warm (6 kept experiments)#1
jjcm wants to merge 6 commits into
masterfrom
cursor/makefaster-lcp-loop-09db

Conversation

jjcm commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Experimental render-performance loop (MakeFaster) run against the production build of this fork, served locally. North star: Lighthouse LCP (v13.4.1, simulated mobile throttling, median of 3 runs per condition, cold + warm).

metric baseline final delta
cold LCP 13,822 ms 3,687 ms −73.3%
warm LCP 12,318 ms 3,683 ms −70.1%
cold TTI 14,844 ms 7,149 ms −51.8%
perf score (cold) 53 87 +34

Kept changes (one commit each)

  1. Precompress static assets — scripts/compress-build.js runs after react-scripts build and emits gzip + brotli siblings for the text assets in build/ (vendor chunk 2,027 KB → 407 KB brotli). Any static host that serves compressed siblings picks them up (e.g. nginx gzip_static/brotli_static, http-server -g --brotli). Measured: −60.8% cold LCP.
  2. Cut critical-path JavaScript — chart.js + moment (~206 KB raw) load via dynamic import only when a chart/scatter visualization actually renders; the home route never fetches them. −5.5% cold LCP.
  3. Inline critical HTML shell — public/index.html paints the app frame and the home intro paragraph (the LCP element) from static HTML+CSS before the bundle mounts; React replaces it on mount, and an inline script hides it on deep links. −8.7% cold LCP, warm FCP 3,176 → 755 ms.
  4. Defer analytics loading — the tag script is injected on the load event instead of an async <head> script, so it no longer competes with render-critical resources (the stub queue still records early events). −12.6% cold LCP.
  5. Self-host the interface font — replaces the render-blocking fonts.googleapis.com stylesheet + fonts.gstatic.com fetch with an inline @font-face over a same-origin woff2 (one variable-width latin file covers weights 400/700). −11.4% cold LCP, cold FCP 3,116 → 759 ms.
  6. Lazy-load the code editor — with the LCP now painted from the static shell, the ace editor (64% of the vendor bundle) moves to a lazy chunk; entry vendor 457 KB → 129 KB gzip. −40.3% warm LCP, cold flat within noise.

Tried and reverted (by the numbers)

  • Lazy editor before the HTML shell keep (+16% cold LCP — the boot-time chunk was chained into the LCP graph)
  • Inline the shared stylesheet (+9.6% — heavier document outweighed the saved round trip)
  • loading="lazy" on markdown images (−0.7%, below the noise floor)
  • font-display: swap alone (−0.7% — the web-font repaint forms a larger, later LCP candidate)
  • Metric-matched fallback font (no change)
  • Preload the critical font (+9.7% — stole bandwidth from render-blocking resources)
  • Drop bluebird for native promises (no measurable LCP change)

Notes

  • Experimental branch for the MakeFaster loop on this fork only; not intended for upstream as-is.
  • The self-hosted font ships the latin subset (the UI and entry content); other scripts fall back to the system sans-serif stack.
  • The static shell mirrors the home route and is hidden by an inline script when booting a deep link, so algorithm/scratch-paper URLs never flash home content.
  

jjcm marked this pull request as ready for review August 26, 2026 00:16
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL