Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Each column has a description of what it means if you set your mouse to hover over it in Firebug. I'll assume you can read up on how each column works on your own then. However, you have definitely come across some odd behavior which needs to be explained.</p> <p>The <em>own time</em> is the amount of time the function spent executing code inside of itself. If the function calls no other functions, then <em>own time</em> should be the same as <em>time</em>. However, if there are nested function calls, then <em>time</em> also counts the time spent executing them. Therefore, <em>time</em> will almost always be larger than <em>own time</em>, and will in most cases add up to more than the total time reported by the profiler.</p> <p>However, no <strong>single</strong> function's <em>time</em> should be larger than the total time the profiler logged for JavaScript calls. This problem is definitely a bug, and I can see why you have trouble trusting Firebug when it gives you such a paradoxical output. I believe I've tracked down the reason this bug occurs: AJAX.</p> <p>It appears that AJAX calls are causing columns that count nested function calls to report incorrect information. They end up counting both the time of JavaScript execution <strong>and</strong> the request to the server.</p> <p>You can reproduce this profiler bug by doing the following:</p> <ol> <li>Go to any site that uses AJAX. (I used <a href="http://juicystudio.com/experiments/ajax/index.php" rel="noreferrer">http://juicystudio.com/experiments/ajax/index.php</a>)</li> <li>Enable Console/Script debugging.</li> <li>Turn on the profiler.</li> <li>Make an AJAX call. (Multiple ones may illuminate the issue more.)</li> <li>Stop the profiler, examine the output.</li> </ol> <p>In this example, with regards to <em>time</em> vs. <em>own time</em>, the <em>own time</em> of each function adds up to the profiler's total time but the <em>time</em> column incorporates the amount of time the AJAX call took to talk to the server. This means that the <em>time</em> column is incorrect if you're looking for just the speed of JavaScript execution.</p> <p>It gets worst: since <em>time</em>, <em>average time</em>, <em>min</em> and <em>max</em> all count nested function calls, they're all incorrect if you're using AJAX. On top of that, any function that eventually uses AJAX (in a nested function call) will also report their time incorrectly. This means that a whole lot of functions may be reporting incorrect information! So don't trust any of those columns for now until Firebug fixes the issue. (It's possible they intended the behavior to be this way, though it is confusing at best to leave it this way.)</p> <p>If you're not using AJAX, then another issue is at play; let us know if you are or not.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload