Repository navigation
ci(lighthouse): measure the bundle the way production serves it - #789
Merged
Merged
Conversation
#787 was filed as "public pages intermittently never settle". They settle. The ~93s LCP was not a page bug, a timer, or a hanging request — it was an accurate simulation of a bundle five times larger than the one production ships. The report says so directly. On /privacy the long tasks do not start until **92,258 ms** — the bundle is not slow to parse, it is slow to *arrive* — and the settings are: throttlingMethod simulate formFactor mobile downloadThroughput 1474.56 Kbps cpuSlowdownMultiplier 4 entry-<hash>.js transferSize 17.42 MB (networkEnd 213ms in real time) 17.4 MB at 1474 Kbps is 97 seconds. LCP ~93s and TTI ~94s are that number, capped by `maxWaitForLoad: 90000`. TTI was ~94s on **every page and every run**, including the ones I had called clean — the LCP flake was only whether hydration re-attributed the largest element after the bundle finally landed, which is why it moved between pages and looked random. Production does not send 17.4 MB: expo serve 17.42 MB ← what this job was measuring production (gzip) 3.64 MB production (br) 3.27 MB `expo serve` applies no compression. `apps/scaffald/server/index.js` — which already exists, is the documented Express/Dockerfile path in SSR-DEPLOY.md, and whose deps all resolve — applies `compression()` and serves `/_expo` as `immutable, maxAge: '1y'`, which is what production does. So the job runs that instead, and measures something a real visitor could experience. This does not make the bundle acceptable. 3.27 MB brotli is still roughly 18 seconds to interactive on the same simulated connection, and compression does nothing for the 2.2s of script evaluation or the ~1,700ms TBT, which are CPU. It makes the measurement honest, which is the precondition for #774's box 5 — budgets ratcheted from reality rather than from a harness artifact. Refs #787, #774 Co-Authored-By: Claude Opus 5 <[email protected]>
This was referenced Sep 17, 2026
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.
#787 was filed as "public pages intermittently never settle". They settle. The
~93s LCP was not a page bug, a timer, or a hanging request — it was an accurate
simulation of a bundle five times larger than the one production ships.
The report says so directly. On /privacy the long tasks do not start until
92,258 ms — the bundle is not slow to parse, it is slow to arrive — and
the settings are:
17.4 MB at 1474 Kbps is 97 seconds. LCP ~93s and TTI ~94s are that number,
capped by
maxWaitForLoad: 90000. TTI was ~94s on every page and every run,including the ones I had called clean — the LCP flake was only whether hydration
re-attributed the largest element after the bundle finally landed, which is why
it moved between pages and looked random.
Production does not send 17.4 MB:
expo serveapplies no compression.apps/scaffald/server/index.js— whichalready exists, is the documented Express/Dockerfile path in SSR-DEPLOY.md, and
whose deps all resolve — applies
compression()and serves/_expoasimmutable, maxAge: '1y', which is what production does. So the job runs thatinstead, and measures something a real visitor could experience.
This does not make the bundle acceptable. 3.27 MB brotli is still roughly 18
seconds to interactive on the same simulated connection, and compression does
nothing for the 2.2s of script evaluation or the ~1,700ms TBT, which are CPU.
It makes the measurement honest, which is the precondition for #774's box 5 —
budgets ratcheted from reality rather than from a harness artifact.
Refs #787, #774
🤖 Generated with Claude Code