What is "Document count" counter in Timeline tab of Chrome Dev Toolbar?
Asked Answered
D

2

29

Could someone explain me what does 'Document count' counter stands for in Timeline tab of Chrome Dev Toolbar?

In my application I'm using iframes and navigate within a set of pages in one of them. Currently 'Document count' counter shows me a range of values 23-32, what doest it stand for?

Thanks in advance.

Doubtful answered 3/4, 2013 at 7:24 Comment(1)
Here is a clear answer with referenceEpigeal
J
2

It is number of live document resources in the inspected render process. According to documentation:

Is my page using too much memory? - the Timeline memory view and Chrome task manager can help you identify if you’re using too much memory. Memory view can track the number of live DOM nodes, documents and JS event listeners in the inspected render process. As a rule of thumb: avoid holding references to DOM elements you no longer need to use, unbind unneeded event listeners and take care when storing large chunks of data you aren't going to use.

Reference: https://developer.chrome.com/devtools/docs/javascript-memory-profiling#questions-to-ask-yourself

Your application may load document resources (The load event is fired once all of the document’s resources (images and CSS files, and so forth) have been fully loaded) and then close them. To verify that a certain application operation doesn't create leaks (e.g. usually a pair of direct and reverse operations, like opening a document, and then closing it, should not leave any garbage), you may compare multiple snapshots to each other.

Journalese answered 31/3, 2016 at 11:52 Comment(0)
J
4

From what I understand, that counts documents and iframes - I'm not sure what exactly qualifies for a document though. I just came across your question as Chrome is reporting that I have two documents, but I don't have any iframes and it isn't clear as to what is a document

Jesus answered 29/8, 2013 at 20:58 Comment(1)
The way to find out is checking the dropdown above console; you can see the documents listed there. Mostly mine is either plugins or tracking on pages which generally load inside iframes.Twotone
J
2

It is number of live document resources in the inspected render process. According to documentation:

Is my page using too much memory? - the Timeline memory view and Chrome task manager can help you identify if you’re using too much memory. Memory view can track the number of live DOM nodes, documents and JS event listeners in the inspected render process. As a rule of thumb: avoid holding references to DOM elements you no longer need to use, unbind unneeded event listeners and take care when storing large chunks of data you aren't going to use.

Reference: https://developer.chrome.com/devtools/docs/javascript-memory-profiling#questions-to-ask-yourself

Your application may load document resources (The load event is fired once all of the document’s resources (images and CSS files, and so forth) have been fully loaded) and then close them. To verify that a certain application operation doesn't create leaks (e.g. usually a pair of direct and reverse operations, like opening a document, and then closing it, should not leave any garbage), you may compare multiple snapshots to each other.

Journalese answered 31/3, 2016 at 11:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.