Skip to main content

Rendering for Frontend Performances

Rendering performance is how efficiently the browser turns HTML, CSS and JavaScript into pixels. It involves the critical rendering path, layout, paint and compositing. Avoiding forced synchronous layout, animating only transform and opacity, and using content-visibility keeps frames within the 16 millisecond budget.

Stage: Runtime · Part of the Frontend Performance roadmap · Last reviewed 19 November 2026

What to learn in Rendering

Rendering interview questions

What is layout thrashing?

It happens when code alternates between writing styles and reading layout values like offsetHeight in a loop, forcing the browser to recalculate layout each time. Batch all reads first, then all writes, or use requestAnimationFrame.

Why are transform and opacity cheap to animate?

They can be handled by the compositor on the GPU without recalculating layout or repainting the element. Animating properties like width, top or margin forces layout and paint on every frame, which easily drops below 60 frames per second.

Where Rendering fits in the Frontend Performance roadmap

Rendering belongs to the Runtime stage (intermediate level), which takes about 10 hours. Keep it smooth.

Back to the full Frontend Performance roadmap