Google Lighthouse’s ‘Avoid an excessive DOM size’ warning is a performance metric you’ll want to look out for. The Document Object Model (DOM) aspect of this lets scripts access and manipulate the elements of your site. This includes your HTML and CSS. However, a large DOM size can cause performance issues, maintenance problems, and much more.
For this post, we’ll show you how to solve the ‘Avoid an excessive DOM size’ warning in Google Lighthouse. First, let’s help you understand what it means. 👨🎓

What the “Avoid an excessive DOM size” warning means
The DOM is essentially a kind of database of the different elements on your site. This includes your headings, paragraphs, images, links, and more. A good visual representation of this is the code output from a WordPress page builder plugin like Elementor.