Insights Performance
Put the performance budget before the merge
A monitoring dashboard after release looks impressive and prevents nothing. The number has to appear while someone is still willing to fix it.
Dashboards prevent nothing
Post-release performance monitoring is an easy proposal to get approved: attractive charts, live numbers, and nobody has to change how they work. Its only flaw is that it does not work. By the time a line trends upward on the dashboard, the code merged a fortnight ago, the person who wrote it is elsewhere, and the regression has been reclassified as technical debt.
A budget is a set of specific numbers
"The site should be fast" is not a budget. No more than 90KB of JavaScript above the fold, LCP under 1.2 seconds, at most two third-party scripts, no single image over 200KB — that is a budget. It has to be specific enough for a machine to adjudicate, or it stays a sentence everyone agrees with and nobody enforces.
Before the merge, the difference is who fixes it
This is the only part that really matters. A number you see after release belongs to someone who has already switched context. A number that blocks a merge belongs to the person who wrote that code ten minutes ago and still remembers why. The same fix costs half a day in the first case and ten minutes in the second.
Someone will be annoyed, and that is required
On the NOMU project two campaign pages were blocked for oversized imagery and the assets had to be remade. Both times somebody asked whether we could let it through just this once. Had we said yes, the budget would have become a suggestion, and suggestions do not change behaviour. The failure message has to name the line item, the amount over, and the way to fix it — strict, but never mysterious.
Where to set the numbers
Do not start from the ideal. Measure what you have today and set the budget slightly better than that, then tighten one notch a quarter. A budget set at the ideal value on day one gets switched off by the whole team in week one, and nothing that gets switched off is ever switched back on.
The effect we did not predict
Fourteen months on, the NOMU budget has never been loosened. More interesting is that the marketing team wrote their own asset specification, because they did not want to be blocked again. A line drawn clearly enough eventually becomes somebody else habit, and that outlasts any individual optimisation.