Services

Cloudflare Performance Follow Up 2026 06 16


Cloudflare performance follow-up — 2026-06-16

Scope: integrated validation after the Cloudflare artifact budget gate, static cache header, and local route smoke-check slices landed.

What changed#

  • Added perf:cf-budgets / perf:check root scripts backed by tools/scripts/check-cloudflare-artifact-budgets.mjs and tools/cloudflare-artifact-budgets.json.
  • Added perf:smoke route timing/resource checks backed by Playwright and tools/performance-smoke-routes.json.
  • Tightened public _headers cache rules across Cloudflare-hosted apps so hashed static assets can use long-lived immutable caching, with shorter TTLs for other static asset classes.

How to run the gates#

bash
1
mise exec -- node tools/scripts/check-cloudflare-artifact-budgets.mjs --allow-missing --dry-run
2
mise exec -- node tools/scripts/performance-smoke.mjs --list
3
4
# When local dev/preview servers are already running:
5
pnpm perf:smoke
6
pnpm perf:check

Useful focused runs:

bash
1
mise exec -- node tools/scripts/check-cloudflare-artifact-budgets.mjs --app www --allow-missing --dry-run
2
mise exec -- node tools/scripts/performance-smoke.mjs --target www --base-url http://127.0.0.1:3040

Validation evidence#

  • mise exec -- node tools/scripts/performance-smoke.mjs --list completed successfully and listed the configured www, docs, and blog route targets without network access.
  • mise exec -- node tools/scripts/check-cloudflare-artifact-budgets.mjs --allow-missing --dry-run executed against existing local artifacts. It reported current budget misses for most existing OpenNext/Page outputs, while manager passed all configured budgets. Because the run used --dry-run, it validated reporting without blocking on pre-existing artifact size debt.
  • _headers files for academy, blog, design-system, docs, manager, ui-library, and www now include explicit Cache-Control rules for static asset paths.

Expected performance impact#

  • Long-lived immutable caching should reduce repeat-view bytes and CDN origin revalidation for hashed static assets after deployment.
  • The new artifact gate does not optimize bundles by itself; it exposes deploy-output size regressions early. Current local artifacts show large existing size debt, especially OpenNext app assets, so budget failures should be treated as a prioritization signal rather than evidence of this slice introducing regressions.
  • The smoke check adds a low-cost local guard for representative route load time and resource volume before broader Lighthouse or deployed Web Vitals checks.

Remaining higher-risk opportunities#

  1. Rebuild each Cloudflare app from a clean workspace and record budget results from fresh artifacts before tuning limits.
  2. Investigate the largest OpenNext asset contributors for academy, blog, design-system, docs, and ui-library.
  3. Validate deployed response headers for static assets, images, SSR routes, APIs, and personalized paths before broadening cache rules further.
  4. Add deployed-route Web Vitals or Lighthouse checks once stable preview URLs are available.