تخطي إلى المحتوى الرئيسي
All notes
2026 · 02 · 6 min

A perf budget you can actually enforce in CI

Most perf budgets don't survive contact with reality. The one that does: bundle baselines on PR + a single LCP alert from real users.

Performance budgets fail because they're either too granular (everyone ignores them) or too forgiving (they catch nothing). The version that survives: two checks, one in CI, one in production.

In CI: bundle size against a stored baseline per route. Not a flat number, a per-route delta with a 5% threshold. If a PR adds more than that to a route bundle, the PR comments with the offending modules. No approval, no merge.

In production: a single LCP alert wired to Datadog RUM, set at p75 above target for 10 minutes. That's it. Don't alert on TTFB, don't alert on CLS spikes, those have too much noise and too little signal at the team scale where you're trying to ship.

On M&M'S we ran this exact setup. The CI check caught a third-party tag library that would've added 180kb to the homepage. The LCP alert caught a CDN regression two minutes after deploy. That's the whole game.

WRITTEN BY
Ibrahim Aly
SENIOR FS ENGINEER · BERLIN ↔ CAIRO