I have been an advocate of Firebug for a long time now, it’s the only reason why I still use Firefox! I’ve mainly been using it for CSS/HTML - it’s inline editing is a dream. However lately I have found myself doing a whole bunch of JavaScript, and Firebug still keeps surprising me. I must admit, I never read the instruction manuals, so this one was a bit of a surprise when I found it, the profiler.
Your web app is almost perfect. You’ve got all the bugs worked out, the artwork has been dropped in, and the users are loving it. Only one problem - some of your features are a little bit sluggish and you’re not sure why.
With Firebug, you’ll never again wonder why your code is slow. Using the Firebug profiler, you can separate the tortoises from the hares within seconds.
To use the profiler, just go to the Console tab and click the "Profile" button. Then use your app for a bit or reload the page and then click the "Profile" button again. You’ll then see a detailed report that shows what functions were called and how much time each one took.
Basically it lets you find out what the hell is causing your JavaScript to run slowly. Thank you Firebug!



Just one problem though: you don’t get a call graph, so there’s no easy way to tell why fooMunge() is being called fourty thousand times. Course you *can* find it out by starting from the function that takes the longest time (likely to be your entry point to the slow operation) and working down from there. But a call graph would be a lot easier to read.
February 7th, 2008 at 8:37 am