What is "Document count" counter in Timeline tab of Chrome Dev Toolbar? What is "Document count" counter in Timeline tab of Chrome Dev Toolbar? google-chrome google-chrome

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


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


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.