6

You can see the word "Document Count" in Chrome DevTools.

(source: chrome.com)

What is it?

For example, recording the below website, the number of documents is 8 or 9. https://developers.google.com/chrome-developer-tools/docs/javascript-memory-profiling?hl=it#dominators

This is a question of a tool but I think this could be a question of HTML, so I'm asking here.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Nigiri
  • 3,469
  • 6
  • 29
  • 52

1 Answers1

1

The "Document Count" maintains a count of the number of documents used by your application over time, that are held in memory (not garbage collected). Iframes on your page along with their documents are also counted here. This counter may contribute in helping you identify what events in your application may be leading to a memory leak.

Please see the link below: https://developers.google.com/chrome-developer-tools/docs/timeline

Alina
  • 126
  • 1
  • 6
  • 4
    If I do not use any Iframes how can my webpage be using multiple documents? currently 23 documents are counted in Chrome Dev Tools timeline – damien murphy. Mar 25 '16 at 21:03
  • 2
    Wow, hard to believe this is marked as the right answer in spite of the glaring outstanding question from @damienmurphy. – tadasajon Sep 16 '16 at 17:54
  • I have 7 documents in my web app that goes down to 2 after a short while. I also have no iframes. I'm going to take a guess and say that perhaps a "document" also includes literal "documents" or "files". Perhaps a "document" is some structure in memory where a file is loaded before it's put into memory? I guess my app ends up with 2 (rather than 1, ie the DOM) because one of my files perhaps doesn't get put into memory because the browser decided not to. PS my app has a lot of media in it (3D graphics, canvases, audio, plenty of DOM nodes, etc). Way more than 7 files. Hope this helps-ish! – Tom Mar 11 '21 at 22:45