Archived topic
Avoid an excessive DOM size
5 replies · Started by Patricia on May 12, 2021
Hi, I am having this problem on speed testing tools, do you know how can I fix it? Thanks:
Avoid an excessive DOM size
A large DOM will increase memory usage, cause longer style calculations, and produce costly layout reflows.
STATISTIC ELEMENT VALUE
Total DOM Elements 2,299
Maximum DOM Depth
<span class="lwptoc_item_number">. 19
Maximum Child Elements
STATISTIC ELEMENT VALUE
Total DOM Elements 2,299
Maximum DOM Depth
<span class="lwptoc_item_number"> 19
Maximum Child Elements
Hi there,
every single element you add to a posts content, from a single paragraph, to an image, a list etc all add to the DOM count. The only way to reduce that is to remove content from long posts/pages or break them into several pages. See Page Break Block:
https://wordpress.com/support/wordpress-editor/blocks/page-break-block/
The issue it poses is if you're page uses a lot of CSS styles, commonly seen if using a Page Builder. Simple styles and layouts don't pose a problem. It is however an indicator that you have a lot of content on a post.
understood! Thank you very much! :)
You're welcome