Understanding Node Count with Chrome Developer Tools for Developers

I am developing a web application in which a div is created in every mousemove event.

When profiling using the Chrome Developer Tool Timeline, I see an increase in Node Counts (green line), but a very small number of Detached DOM tree when moving the mouse. When the mouse does not move, the Node count is stable and never decreases / increases.

I'd like to know:

  • How exactly does the Node account (green line) work? Does memory information provide a cumulative relationship to the start of a recording?
  • I was suspected of a DOM memory leak, but when I accept HEAP, I see several Detached DOM tree . What could be the reason for the steady increase in the Node score?
  • Does Node calculate the total memory of a JS application?
  • What is the difference between Document DOM tree / xxx entries and Object Count ?

enter image description here

enter image description here

EDIT:

After some research, I suspect that Node Counting is not necessarily a memory leak in this case (also running Chrome / Task Manager, I see that JS Memory is stable and not constantly increasing). This is most likely a memory usage in the browser, when in fact I do not move the mouse for 30 seconds or open another tab / window, and the garbage collector is thrown in and the memory is cleared, as in the following image. By the way, any expert advice on this subject is very welcome :)

enter image description here

Interesting:

Javascript memory issues and leak issues

https://developers.google.com/web/tools/chrome-devtools/profile/memory-problems/memory-diagnosis

+5
source share

Source: https://habr.com/ru/post/1240902/


All Articles