admin管理员组文章数量:1394209
Some code in my page is making my browser slow after 20-30 min. I need to know which one. What tools can i use to debug this out.
Following js files are being loaded
- Jquery
- Jquery ui
- History
- Mustache
Yes i had settimeout and thought that to be the culprit but alas after removing it too, it's still a bit slow.
Some code in my page is making my browser slow after 20-30 min. I need to know which one. What tools can i use to debug this out.
Following js files are being loaded
- Jquery
- Jquery ui
- History
- Mustache
Yes i had settimeout and thought that to be the culprit but alas after removing it too, it's still a bit slow.
Share Improve this question edited Jan 13, 2012 at 11:52 aWebDeveloper asked Jan 13, 2012 at 10:27 aWebDeveloperaWebDeveloper 38.5k41 gold badges178 silver badges247 bronze badges 5- Post your JS code. Without it it's hard for us to tell you what it is. My guess would be long loops (while or for). – Jeffrey Commented Jan 13, 2012 at 10:28
- 4 Psychic code reading powers: ACTIVATE! – Rory McCrossan Commented Jan 13, 2012 at 10:29
- 2 Slowing down your page after 20-30 mins? Sounds like a memory leak to me. Chrome has useful built-in developer tools. – Rob W Commented Jan 13, 2012 at 10:29
-
Another possibility, are you calling
setTimeout
repeatedly? (or JQuery moral equilivant)? – Ed Heal Commented Jan 13, 2012 at 10:35 - what javascript libraries are you using? – Umesh Patil Commented Jan 13, 2012 at 10:35
2 Answers
Reset to default 4You should use Google's Speed Tracer. It's a Chrome extension.
Speed Tracer is a tool to help you identify and fix performance problems in your web applications. It visualizes metrics that are taken from low level instrumentation points inside of the browser and analyzes them as your application runs. Speed Tracer is available as a Chrome extension and works on all platforms where extensions are currently supported (Windows and Linux).
Alternatively, you have Yahoo!'s YUI 2: Profiler.
The YUI Profiler is a simple, non-visual code profiler for JavaScript. Unlike most code profilers, this one allows you to specify exactly what parts of your application to profile. You can also programmatically retrieve profiling information as the application is running, allowing you to create performance tests YUI Test or other unit testing frameworks.
An addendum to @Julio Santos ' answer
You can use Dynatrace Ajax which has a good free version of their product
本文标签: jqueryHow to find out what JavaScript code is slowing down my pageStack Overflow
版权声明:本文标题:jquery - How to find out what JavaScript code is slowing down my page - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744712920a2621231.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论