I am searching for tool or rules set for searching of unresponsive (or slow) scripts(I guess JS in most cases). Of course it could be browser dependend, coz some unresponsive script in firefox work ok in chrome. Still some materials should exist.
-
Can you be more specific? How do you quantify "slow script"?– user246Apr 18, 2015 at 13:26
-
In firefox it is warning window, script takes long time to execute. Do You want to continue or kill that script. Chrome usually kills that long script, but also some times might ask. Usually it is issues releated with old jquery execution, but not always.– SkorpENApr 20, 2015 at 8:27
1 Answer
What you're looking for is called a javascript profiler. Most modern browsers include some kind of a profiler with their developer toolkits. Here are some links
Chrome JS Profiler
Firefox JS Profiler
A good code profiler (JS or not) will tell you who started what function call (stack trace or call tree), how long the particular function was running and possibly what resources it is using over time. Some profilers do flame charts which are a great way to visualize resource utilization and latency.
Here is a screenshot from Chrome JS Profiler: