Avoid an excessive DOM size | Lighthouse | Chrome for Developers
A large DOM tree often includes many nodes that aren't visible when the user first loads the page, which unnecessarily increases data costs for your users and slows down load time. Runtime performance As users and scripts interact with your page, the browser must constantly recompute the position and styling of nodes. A large DOM tree in combination with complicated style rules can severely slow down rendering and interactivity. Memory performance If your JavaScript uses general query selectors such as document.querySelectorAll('li'), you may be unknowingly storing references to a very large number of nodes, which can overwhelm the memory capabilities of your users' devices. Lighthouse reports the total DOM elements for a page, the page's maximum DOM depth, and its maximum child elements: Lighthouse flags pages with DOM trees that: In general, look for ways to create DOM nodes only when needed, and destroy nodes when they're no longer needed. If you're shipping a large DOM tree, try lo
Home Docs Lighthouse Avoid an excessive DOM size Stay organized with collections Save and categorize content based on your preferences. Warning: This audit has moved into the Optimize DOM size insight as of Lighthouse 13. For more information see What's new in Lighthouse 13 . A large DOM tree can slow down your page performance in multiple ways: Network efficiency and load performance A large DOM tree often includes many nodes that aren't visible when the user first loads the page, which unnecessarily increases data costs for your users and slows down load time. Runtime performance As users an
Explore this link on the map →related reading
- Populating the page: how browsers work - Performance | MDNdeveloper.mozilla.org
- Render-tree Construction, Layout, and Paint | Articles | web.devdevelopers.google.com
- abseil / Performance Hintsabseil.io
- Cheng Lou on X: "My dear front-end developers (and anyone who’s interested in the future of interfaces): I have crawled through depths of hell to bring you, for the foreseeable years, one of the more important foundational pieces of UI engineering (if not in implementation then certainly at https://t.co/BKnwCDIp75" / Xx.com
- Introducing: React Best Practices - Vercelvercel.com
- The Conductor Rewrite: What They Changed to Make It Fastperformance.dev
- The Web Animation Performance Tier List | Motion Magazinemotion.dev
- An Introduction to the Browser Rendering Pipelinewebperf.tips
- The Web Animation Performance Tier List | Motion Magazinemotion.dev
- Exploring Million.js, a high-performance web frameworkblog.openreplay.com
- Adding Interactivity with JavaScript | Articles | web.devdevelopers.google.com
- Just Fucking Use Reactjustfuckingusereact.com