At a glance the headline numbers for DOM depth
The deepest nesting level in the DOM tree.
The typical DOM tree is 18 levels deep.
Distribution & median INP site count and median INP at each level of DOM depth
Passing INP by DOM depth which level passes the INP most often
DOM depth 18. p75 23. p99 41. At the low end (1): INP 102ms. At the high end (>p98): INP 102ms. computed
Why this matters for the Core Web Vitals, and where to start fixing it
Depth is a different problem than size. Styles inherit downwards. Toggle a class high in the tree and the browser recalculates everything below it. Layout changes also travel through ancestors, and percentage heights and flexbox make that worse. Selector matching walks the ancestor chain too, so deep trees pay more for every CSS rule.
In practice this shows up as INP. The click is fast and the JavaScript is fast, but the style and layout pass after the update is slow because the change affects too many nested levels. A flatter tree holds the same content but keeps each update local.
How does DOM depth affect the Core Web Vitals?
Nesting levels correlate with the INP. In the flattest trees, 81% of sites pass the INP. In the deepest trees, 87% do. The rise is gradual.
Chrome field data from 94,910 sites, representing millions of real page loads. How we measured.