Timeline memory profiler

123 views
Skip to first unread message

mas

unread,
Jun 4, 2014, 10:17:41 AM6/4/14
to google-chrome-...@googlegroups.com
Hi there,
Timeline memory profiler shows the number of nodes, listener, and documents. I was wondering how it counts the listeners? In addition, is there any way we can see the listeners in heap snapshot taken by profiler?

Thanks,
Mas

Yury Semikhatsky

unread,
Jun 5, 2014, 5:35:16 AM6/5/14
to Google Chrome Developer Tools
On Wed, Jun 4, 2014 at 6:17 PM, mas <masoomeh....@gmail.com> wrote:
Hi there,
Timeline memory profiler shows the number of nodes, listener, and documents. I was wondering how it counts the listeners?
The counter is a global per render process variable which incremented every time a JS event listener is created (either a JS function is added to a DOM object or html with DOM0 handler attribute is parsed, in the latter case the handler code will be parsed lazily on first invocation but the counter is still incremented eagerly). It is decremented when the listener instance is destroyed (usually after GC).
 
In addition, is there any way we can see the listeners in heap snapshot taken by profiler?

You can see listener JS functions in the snapshot, native part of cause is not represented there. So if there is an event listener attribute 'onclick="doSomethin()"' it will only be represented as an anonymous function in the snapshot if it has fired at least once.

 
Thanks,
Mas

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/c520ed2c-8ebc-40c4-bcec-42695a48bee2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages