6.0 KiB
Performance Test Instructions
Feature: prerendering. Lighthouse was not run in this stage. Two sets of figures exist and they must not be mixed:
- Reference measurement (
construction/hosting-and-targets/code/measurement-final.md): 3 runs per URL, median, on the author's PC, commit6d4d012, 2026-11-01. This is where scores can be compared with master. - CI run 599 (commit
2006fa0, Pi runner, 1 run per URL): scores are much lower and only warn. They are not comparable with the reference measurement.
Purpose
Check the Lighthouse budgets of the 12 URLs with the three units combined. This is a static site: there is no load or stress test, because there is no server-side work to load. The goal of the feature is faster first paint and better SEO by serving prerendered HTML (NFR-PR-P-01 to P-04).
Performance Requirements
Targets after the owner's decisions of 2026-11-01 (web/lighthouserc.cjs, each URL matches exactly one entry):
| URL | Mobile target |
|---|---|
/ |
0.85 (raised from 0.8; kept at the current score until responsive photos) |
/soorten-fotoshoots/zwangerschap, /gezin, /loveshoot, /portret |
0.85 |
| All other indexed pages and the not-found page | 0.9 |
- Desktop (
lighthouserc.desktop.cjs): 0.9 on all 12 URLs. - Accessibility, best practices: 1 on every URL. SEO: 1 on indexed pages;
/privacyverklaringand the not-found page deliberately failis-crawlable(noindex). numberOfRunsis 1.
Setup Performance Test Environment
1. Prepare Test Environment
- Build first (
pnpm build). Lighthouse runs against the built site throughconfig/previewServer.ts, started by Lighthouse CI with--audit-route(the not-found page is audited at/__audit/404, because Lighthouse refuses a page with status 404 and/404.htmlis a real 404 now). - Port 4173 must be free (
--strictPort). - Chrome must be installed. In the CI container Chrome needs
LIGHTHOUSE_CHROME_FLAGS='--no-sandbox --headless=new --disable-dev-shm-usage'.
2. Configure Test Parameters
- Strictness: locally
LIGHTHOUSE_PERFORMANCEis unset, so a performance miss fails the run. In CI it iswarn. - Reports:
web/lighthouse-reports/mobile/and.../desktop/(HTML and JSON); the CI job uploads them as artifactlighthouse-reports(50 files, 14 days).
Run Performance Tests
1. Execute Lighthouse (mobile and desktop)
cd web
pnpm build
pnpm lighthouse
pnpm lighthouse is lhci autorun && lhci autorun --config=lighthouserc.desktop.cjs. For a more reliable local reading use 3 runs: pnpm exec lhci collect --numberOfRuns=3 per preset, and compare medians.
2. Execute the Gate
cd web
pnpm check
Runs lint, format, tests, build, browser tests, both audits and Lighthouse. / sits exactly at its 0.85 target with one run, so a slow local run can fail pnpm check.
3. Analyze Performance Results
Reference measurement (author's PC, 3 runs, median; master / after unit 1 / final):
| URL | Mobile score master / unit 1 / final | Mobile LCP ms master / final | Target | Status |
|---|---|---|---|---|
/ |
0.75 / 0.85 / 0.85 | 4293 / 4357 | 0.85 | pass, exactly at target |
/over-mij |
0.86 / 0.90 / 0.92 | 3535 / 3233 | 0.9 | pass |
/portfolio |
0.90 / 0.94 / 0.93 | 2926 / 3232 | 0.9 | pass |
/soorten-fotoshoots |
0.85 / 0.89 / 0.92 | 3750 / 3306 | 0.9 | pass |
.../newborn |
0.85 / 0.90 / 0.91 | 3525 / 3457 | 0.9 | pass |
.../zwangerschap |
0.84 / 0.88 / 0.90 | 3676 / 3606 | 0.85 | pass |
.../gezin |
0.84 / 0.88 / 0.89 | 3678 / 3681 | 0.85 | pass |
.../loveshoot |
0.82 / 0.86 / 0.88 | 3768 / 3831 | 0.85 | pass |
.../portret |
0.84 / 0.89 / 0.90 | 3673 / 3606 | 0.85 | pass |
/contact |
0.87 / 0.94 / 0.94 | 3345 / 3007 | 0.9 | pass |
/privacyverklaring |
0.90 / 0.96 / 0.96 | 2844 / 2780 | 0.9 | pass |
| Not found | 0.91 / 0.97 / 0.97 | 2603 / 2630 | 0.9 | pass |
- FCP on mobile fell from about 2.5 to 2.7 s (master) to about 1.36 s (final) on every page; TBT from 114 to 293 ms to 61 to 75 ms. CLS stays at 0.021 or lower.
- Desktop: 0.99 or 1.00 on all 12 URLs.
- Accessibility 1 and best practices 1 on every URL, all runs; SEO 1 on the ten indexed pages.
lhci asserton these reports (36 mobile and 36 desktop): all 12 URLs pass in both presets.- LCP itself did not improve on every page (for example
/4293 to 4357 ms, gezin and loveshoot slightly later); the score gain comes from FCP and TBT.
CI run 599 (Pi runner, 1 run, warnings only, the job succeeded):
- Mobile performance 0.47 to 0.66 on the 12 URLs (
/0.49,/over-mij0.53,/portfolio0.61, gezin 0.47,/privacyverklaring0.66, not found 0.59). Every URL warned. - Desktop performance 0.71 to 0.81 on the 12 URLs (
/0.71,/privacyverklaring0.8, not found 0.81). Every URL warned. - The workflow comment says performance on the Pi is not representative (CPU slowdown on a slow machine); that is the reason it only warns there. These numbers say nothing about the feature and are not a regression against the PC figures. They also cannot show an improvement.
- Accessibility, best practices and SEO assertions: passed (no error reported; the job succeeded).
Bundle: main bundle 547,302 bytes raw, 155,603 bytes gzip on the wire (test server, after run 598). Master's figure was not re-measured in this stage.
Results Location: construction/hosting-and-targets/code/measurement-final.md (and measurement-baseline.md, measurement-gate.md, measurement-display.md in the other units' folders); CI artifact lighthouse-reports of run 599.
Performance Optimization
Open items (owner decisions already recorded; nothing to fix in this stage):
/is exactly at 0.85 withnumberOfRuns: 1; responsive photos are the planned way to remove the exceptions of/, gezin and loveshoot.- zwangerschap and portret score 0.90 and keep a 0.85 target only because one run is unreliable near 0.90.
- Production compression was not part of the PC measurements (they ran with gzip on the preview server). The test server sends gzip, as the curl checks show.