frame budget
The time available to produce one frame, about 16.7 milliseconds at 60 frames per second, shared by your code and the browser's own work.
In more detail
The browser needs several milliseconds for style, layout and paint, so JavaScript should use far less than the whole budget. Exceeding it drops frames.
Related terms
- frames per second — How many new images a screen shows each second; 60 frames per second is the usual target for smooth motion.
- refresh rate — How many times per second a display draws a new image, measured in hertz; 60 Hz means 60 times a second.
- requestAnimationFrame() — A function that schedules a callback to run just before the browser's next repaint, the right place to update animations.
Taught in
- requestAnimationFrame vs requestIdleCallback: High-FPS Work — Frontend Architecture & Web Platform