JSBach
JSBach

Reputation: 4747

How to verify how long the JS scripts are taking to run in a website?

I joined a project that is developing a website. We have a main page, but this page is taking extremely long to load and we suspect that one of our scripts is not running correctly (maybe executing too many times or a extremely large loop). Is there any software that can measure how long each script is taking to run?

Thanks!

Upvotes: 0

Views: 89

Answers (2)

kinakuta
kinakuta

Reputation: 9037

If you bring up the developer tools in Chrome (Tools | Developer Tools) there's an "Audits" tab that you can use to do a quick check of your page (there should be a "Reload Page and Audit on Load" option to check before you click on "Run". It will give you some suggestions as to issues it finds on your page. There are other, more extensive ways to check, but this is a very quick "audit" you can perform.

Upvotes: 1

rlemon
rlemon

Reputation: 17666

Have you tried using a Profiler? FireBug is good.

Upvotes: 2

Related Questions