Skip to content
Performance

Routing performance budgets through your pipeline

Keep builds fast by enforcing image, script, and CSS budgets in CI for Astro sites.

Modular Shift Team
Modular Shift Team
Engineering

Why budgets matter

Budgets keep regressions out. Set guardrails for JS/CSS weight, image size, and third‑party scripts so performance doesn’t slip.

What to budget

  • JavaScript: total JS per template and per island
  • CSS: critical vs async; total size caps
  • Images: max hero size, max card size, next‑gen formats required
  • Third‑party: allowed list with size and load‑timing constraints

Implementation

  • Measure in CI using Lighthouse CI (LHR JSON) or custom scripts
  • Fail builds on regressions beyond thresholds
  • Track trends over time and alert on drifts

Example thresholds

  • Total JS < 150KB compressed on marketing templates
  • Hero image < 200KB on mobile, AVIF/WebP only
  • INP < 200ms on key pages (field data)

Conclusion

Make performance a release criterion, not a later fix. Budgets in CI keep teams honest and sites fast.

Want a starter config and thresholds tuned to your site? We can help.

Book a Strategy Call →

The rebuild was transformative — faster pages, easier content updates, and automation that saves hours every week.

Alex M.
Digital Manager — Non-Profit Organisation

Our leads are now routed instantly to the right team member, and site speed is no longer holding us back in search rankings.

Sophie R.
Head of Marketing — Franchise Network

Let’s build something faster, smarter, and static‑first

Your website should work as hard as you do.