Mohammad Umair Khan
Trainer, Mentor, Foo, Bar !
Very large user base
Intuitive Controls
Nice, clean and minimalistic design
Very light weight
Very handy tool set
“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. ” - Brian Kernighan
Brain worked alongside Unix creators Ken Thompson and Dennis Ritchie and contributed to the development of Unix.
Are you sure?
Do you know what Chrome Canary is ?
Playground for developers to explore the latest features in Chrome before they land in the stable channel
Take you debugging skills to the next step
ripped off from "A trip down to memory lane" - Google IO
No arrays?
How are they organized in memory?
Retaining Path
Retaining path # 1
Retaining path # 2
Retaining Path to the Yellow Node
Remove Nodes
Garbage
Garbage nodes
Garbage Collection
Retained Size
What is a Leak?
Usually occurs when you have mistakenly left a retaining path preventing the object to be GC-ed
//... javascript
//some object
user.details = document.createElement('div');
//some display list
usersList.appendChild(user.details);
Lets visualize this through the memory graph ...
user
usersList
details
div
child div
child div
Javascript Objects
External Objects
Leaking Node
Remove the display list
//... javascript
usersList.removeAllChildren();
user
usersList
details
div
child div
child div
Javascript Objects
External Objects
Leaking Node
<-- Leaked Node
Lets use the Dev Tools for a small example on how to figure out if there is a leak in my application...
ProTip:
Use named functions, they ease debugging
chrome://inspect/devices
Thanks ...
http://about.me/mukhan
https://github.com/mohuk/chromeDevToolsDemos
Demo Source
By Mohammad Umair Khan
This talk aims at displaying the power of Developer Tools of the Google's famous browser Chrome.