Why frame budgets deserve the same weight as visual design constraints, and the practical habits that keep an interface feeling instant.
The short answerTreat frame time as a design constraint, not a late optimisation. At 60fps a frame lasts about 16.7 milliseconds and the browser leaves roughly 10 of them for your own work, so animate only transform and opacity, batch DOM reads before writes, and test on a throttled CPU and a real mid-range phone.
Key takeaways
- Treat frame time as a design constraint: at 60fps a frame lasts about 16.7 milliseconds, and the browser leaves roughly 10 of them for your own work.
- Animate only transform and opacity, which the compositor handles without re-running layout or paint, and batch DOM reads before writes.
- Judge responsiveness by Interaction to Next Paint, where 200 milliseconds or less is good, and break up any task that holds the main thread for more than 50 milliseconds.
- Test on a throttled CPU and a real mid-range phone, and honour prefers-reduced-motion.
Performance is usually framed as an engineering concern — something you audit after the design is done. That framing is backwards. The way a site moves is the design. A beautiful layout that stutters reads as broken; a simple one that responds instantly reads as premium.
Every animation on this site had to answer one question before it shipped: can this run inside 8 milliseconds on a mid-range phone? If the answer was no, the animation changed — not the budget.
A frame is 16.7 milliseconds, and you don't get all of it
At 60 frames per second the browser has about 16.7 milliseconds to produce each frame. That budget is not all yours: the browser needs a slice of it to recalculate styles, lay the page out, paint it and composite the layers together. In practice your own work gets roughly 10 milliseconds per frame, and less on a slower phone — which is why the budget above is 8, not 16.
A dropped frame is not subtle. Missing the budget by a few milliseconds doesn't make a page look slightly slower; it makes it look like it stutters, because uneven spacing between frames is easier for the eye to catch than a steady, lower frame rate. A consistent 30 frames per second tends to feel smoother than an average of 50 that wobbles.
Compositor-only motion
The single highest-leverage habit is refusing to animate anything except transform and opacity. Layout-triggering properties — width, top, margin — force the browser back through style, layout and paint on every frame. Transforms go straight to the compositor.
GSAP makes this easy to get right, but it also makes it easy to get wrong. The library will happily tween any property you give it. The discipline has to come from you.
The other half of the discipline is not making the browser do work twice. Reading a layout value such as offsetHeight or getBoundingClientRect() straight after writing a style forces layout to run immediately instead of at the end of the frame; do that in a loop and the page spends its budget re-measuring itself. Batch your reads first and your writes second, and a frame needs one layout pass instead of many. Use will-change sparingly too: promoting everything to its own layer trades processing time for graphics memory, and past a point it makes a page slower, not faster.
Interaction is part of performance
Smooth animation is only half of feeling fast. The other half is how quickly the page answers when someone touches it. Google's Core Web Vitals measure that as Interaction to Next Paint, which replaced First Input Delay in March 2024; a good score is 200 milliseconds or less, measured across real visits rather than on your own machine. The other two vitals follow the same logic: Largest Contentful Paint should land within 2.5 seconds, and Cumulative Layout Shift should stay under 0.1.
The usual culprit is the same one that breaks animation: a long task. Anything that holds the main thread for more than 50 milliseconds delays the next frame and the next tap. Split heavy work into smaller chunks, defer whatever isn't needed for the first paint, and be suspicious of any script that runs on load because someone added it once and nobody removed it.
Measure on hardware you don't own
Your development machine is a lie. Chrome's CPU throttling is a decent approximation, but nothing replaces opening the site on a three-year-old Android phone. That is where scroll jank lives.
A reliable rule of thumb: if it holds up on a throttled 4× CPU with a cold cache, it will feel fine everywhere else. Design for the floor, and the ceiling takes care of itself.
Respect the visitor who asks for less motion
Frame budgets are about people on slow devices; reduced motion is about people for whom movement itself is the problem. Operating systems let anyone ask for less animation, and browsers expose that choice as the prefers-reduced-motion media query. Honour it: swap parallax and large transitions for a fade or an instant state change, and keep the information the motion was carrying.
A page that still works without its animation was designed properly. A page that doesn't was using the animation as a crutch.
More writing
Elsewhere on the site
The ideas here get used rather than just written about — the projects are where the animation and performance work lives, and client work covers the production systems. If you want something built, services explains how that works, or just get in touch.