'Javascript Code Performance analysis tool [closed]
I am stuck with one task now. Requesting your help on this.
Description : There is a functionality written in purely javascript - but with lack of performance. Its taking more than 3.5 seconds to complete the workflow.
Of cource, Its includes a lot of DB calls & functionalities and loops.
This set of codes written by long years ago, so i am not aware of any functionality much on that.
Question : Are there any (free) tools available to trace how many times functions getting called and how much time its taking? (Like DotTrace for .Net)
Note : using IE 6.0 & Our product is very huge will not support firefox.
Thanks Karthik
Solution 1:[1]
Have a look at Jiffy: http://justtalkaboutweb.com/2008/06/25/extensions-for-firebug-yslow-and-jiffy/
If you can afford to buy a product then look at: http://www.softwareverify.com/javascript/profiler/index.html
Another one that comes to mind is http://research.microsoft.com/en-us/projects/ajaxview/
Solution 2:[2]
I never heard of pure Javascript calling directly a DB unless u mean it's using XML requests to call server and this last one performs the DB calls.
Anyway a well known tool to profile Javascript is Firebug. You can go on using your website and application with IE6 if you like, but to profile it I would stringly suggest using Firebug. Download Firefox and than install the Firebug plugin Profile your Javascript code on Firefox and try to fix the poorly performant parts.
Once you have done it's highly probable that your code will also run faster on IE6.
Solution 3:[3]
You can try the "Log calls to 'function name'" on Firebug plugin
Solution 4:[4]
If you're like me and not isolated to IE, then it may be helpful to know that there are profilers available in both Chrome and Safari's Web Inspector tool as well as Firebug. In Webkit, click the Profile tab. In Firebug, the profiler is available through the Console tab.
Solution 5:[5]
The firebug plugin mentioned in some of the older answers no longer exists. It has been replaced by Firefox's Developer tools.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Moin Zaman |
| Solution 2 | Marco Demaio |
| Solution 3 | JoseK |
| Solution 4 | |
| Solution 5 | Bram |
