TLDR Web Dev · ARTICLES & TUTORIALS

HOW DEEP IS YOUR DOM?

frontendatscale.com5 min read

Summary from the TLDR Web Dev newsletter

Excessive DOM size in websites can negatively impact performance, especially on lower-end devices. Deeper DOM trees, while not affecting page load time significantly in a simple experiment, slow down rendering when combined with many elements and complex CSS. This is because the browser needs more time to calculate styles and update the positions of each element, which potentially blocks the main thread and makes the site unresponsive.