// journal
A performance budget you can keep
Budgets fail when nobody checks them. Ours run on every pull request, and here is how we set them.
5 min read
A performance budget is a promise about how heavy a page is allowed to get. Most teams write one at kickoff and never look at it again. Ours is checked by a machine, on every change.
Pick numbers the user feels
We budget for the moments people notice:
- Largest Contentful Paint under 2.5 seconds on a mid-range phone
- Interaction to Next Paint under 200 milliseconds
- Cumulative Layout Shift under 0.1
Bundle size matters, but only because it moves those three.
Make the check automatic
Each pull request builds a preview, runs a lab test against it and comments the result. A change that breaks the budget does not merge until someone decides, on the record, that it is worth it.
Spend the budget on purpose
A budget is not a ban. The 3D robot on our own home page is heavy, so it loads only on capable desktops, after the page is idle, and never blocks the text.
if (tier === "high") loadScene();
A budget nobody checks is a wish.