Question about the DOM Nodes graph in the Performance monitor tool

17 views
Skip to first unread message

Patrick Brosset

unread,
Oct 20, 2021, 5:06:11 AM10/20/21
to 'noreply@skia.org' via devtools-dev

Hey folks,

 

I’m wondering why the DOM Nodes section shows a ton of nodes in the Performance monitor, even when the webpage being monitored doesn’t have any.

 

If you open about:blank, then open the tool, you’ll notice of nodes getting displayed, even if the page only has 3 (html, head, body). In my case, the graph shows around 27500 nodes.

If I then add more with document.createElement(‘div’), they get counted by the tool correctly.

 

Any insights in how this tool works?

 

Thanks,

Patrick

Yang Guo

unread,
Oct 20, 2021, 5:08:55 AM10/20/21
to Patrick Brosset, 'noreply@skia.org' via devtools-dev
I think it counts DOM nodes from all tabs.

Yang

--
You received this message because you are subscribed to the Google Groups "devtools-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devtools-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/devtools-dev/PA4PR83MB05126EF1A8F7A92A4408E55FF7BE9%40PA4PR83MB0512.EURPRD83.prod.outlook.com.

Patrick Brosset

unread,
Oct 20, 2021, 5:22:00 AM10/20/21
to Yang Guo, 'noreply@skia.org' via devtools-dev

Oh interesting, thank you. It does seem to play a role indeed. If I start a new instance of the browser, with just about:blank, I get way fewer nodes.

I’m still confused though. Some fluctuations in the graph don’t seem to be related to tabs I open. In fact, if I then start opening new tabs, the graph doesn’t show new nodes from them.

Yang Guo

unread,
Oct 20, 2021, 5:26:51 AM10/20/21
to Patrick Brosset, 'noreply@skia.org' via devtools-dev
Opening or reloading the new tab page consistently adds about 3k nodes. If I close the tabs except for the one to which DevTools is attached, the number falls down again, likely due to delayed GC.

Screen Shot 2021-10-20 at 11.25.59.png

Patrick Brosset

unread,
Oct 20, 2021, 5:36:32 AM10/20/21
to Yang Guo, 'noreply@skia.org' via devtools-dev

I’m not seeing this at all on my end. Adding/removing new tab pages does not change anything for me.

Resizing the browser window does seem to have some impact though, weirdly enough.

 

 

The blue area is when I had only 1 tab (about:blank), and was resizing the browser window by dragging.

The red area is when I created a bunch of new tab pages, and then closed them all.

 

Could this be a mac vs. windows issue? Or perhaps you have a setting I don’t.

 

From: Yang Guo <yan...@chromium.org>
Sent: Wednesday, October 20, 2021 11:27 AM
To: Patrick Brosset <Patrick...@microsoft.com>
Cc: 'nor...@skia.org' via devtools-dev <devtoo...@chromium.org>
Subject: Re: [EXTERNAL] Re: [devtools-dev] Question about the DOM Nodes graph in the Performance monitor tool

 

Opening or reloading the new tab page consistently adds about 3k nodes. If I close the tabs except for the one to which DevTools is attached, the number falls down again, likely due to delayed GC.

 

Yang Guo

unread,
Oct 20, 2021, 5:38:49 AM10/20/21
to Patrick Brosset, 'noreply@skia.org' via devtools-dev
Do you run extensions? I tried this on a vanilla Chromium.

Alex Rudenko

unread,
Oct 20, 2021, 5:49:22 AM10/20/21
to devtools-dev, Yang Guo, 'noreply@skia.org' via devtools-dev, patrick...@microsoft.com
I have about 50 nodes on about:blank and 4 documents. 
I think probably some of template documents used internally are reported here and probably that adds some more nodes.
Also, text/whitespace counts as a node? 

To unsubscribe from this group and stop receiving emails from it, send an email to devtools-dev+unsubscribe@chromium.org.

Screenshot 2021-10-20 at 11.45.41.png

Patrick Brosset

unread,
Oct 20, 2021, 5:55:22 AM10/20/21
to Alex Rudenko, devtools-dev, Yang Guo, 'noreply@skia.org' via devtools-dev

Alex: Yeah, I would expect text nodes to count as well, and internal documents too, so I’m not really surprised that about:blank would show more than 3 DOM nodes.

 

Yang: I checked, and I only have the Microsoft Office extension installed. I also tried in incognito mode and had the same results. I also downloaded a fresh version of chromium with no extensions, and had the same thing.

To unsubscribe from this group and stop receiving emails from it, send an email to devtools-dev...@chromium.org.

Reply all
Reply to author
Forward
0 new messages