Difference between 'self' and 'total' in Chrome CPU Profile of JS

CoolUserName picture CoolUserName · Aug 19, 2011 · Viewed 24.8k times · Source

What is the difference between the 'self' and 'total' columns in the Chrome CPU profiling of JS code?

enter image description here

Answer

duskwuff -inactive- picture duskwuff -inactive- · Aug 19, 2011

self is how much time was spent doing work directly in that function.

total is how much time was spent in that function, and in the functions it called.