compositor thread
A browser thread, separate from the main thread, that combines layers into frames and can scroll and run some animations on its own.
In more detail
Because it does not wait for JavaScript, the compositor can keep scrolling and transform or opacity animations smooth even when the main thread is busy. A non-passive touch or wheel listener forces it to wait for the main thread before scrolling.
Related terms
- compositing — The final rendering stage, in which separately painted layers are stacked and drawn together on screen, usually by the GPU.
- main thread — The first thread a program starts with; in a browser page it also runs JavaScript and handles input, layout and painting.
- passive event listener — An event listener registered with { passive: true }, which promises never to call preventDefault, so the browser can scroll immediately without waiting for it.
Taught in
- Layout, Reflow, Paint And GPU Compositing Layers — Frontend Architecture & Web Platform
- Modern CSS Animations, Transitions And View Transitions API — Frontend Architecture & Web Platform
- Passive Listeners, Scroll Performance And Touch Interactions — Frontend Architecture & Web Platform