admin管理员组文章数量:1391987
How do I measure if my jQuery (or JS) heavy webpage is dragging/ affecting the CPU performance of client puters (and touch devices)? I'm not asking about load times/etc as they are dependant on the number of JS files. I'm asking about client side resource consumption and associated stability issues if any.
To be specific: I'v embedded a jQuery rotate function to perpetually animate an image, and a couple of other jquery based animated objects in the wordpress template.
How do I measure if my jQuery (or JS) heavy webpage is dragging/ affecting the CPU performance of client puters (and touch devices)? I'm not asking about load times/etc as they are dependant on the number of JS files. I'm asking about client side resource consumption and associated stability issues if any.
To be specific: I'v embedded a jQuery rotate function to perpetually animate an image, and a couple of other jquery based animated objects in the wordpress template.
Share Improve this question asked May 4, 2012 at 15:00 ShitijShitij 1132 silver badges9 bronze badges 5- 2 You could use the profiles tab in chrome developer tools. It will profile the cpu for you. – aziz punjani Commented May 4, 2012 at 15:01
- You could install something like VMPlayer and "spawn" a new virtual PC with specific hardware. – Kevin B Commented May 4, 2012 at 15:02
- I don't know of a way to measure client performance with JS, however, I usually set up a VM throttling the CPU with low amounts of RAM and use the chrome developer tools to get an idea. – Snuffleupagus Commented May 4, 2012 at 15:02
- 1 What's up with everyone giving answers as ments these days? Isn't that what the answer box is for? – Matt Commented May 4, 2012 at 15:05
- @Matt The question: "how can I measure client performance". The ment-answers don't answer that question. ;p – Snuffleupagus Commented May 4, 2012 at 15:10
4 Answers
Reset to default 2You can use webkit profiler (profile, audit tab) that es with web browsers like Google Chrome. Also extensions like page speed and speed tracer are really awesome. You can get an idea on the whole browser process like how much time it spends in UI thread, executing javascript etc.
This is a good question.
You could try Eric's tool that reports the frame rate of the browser.
http://churchm.ag/monitor-javascript-performance/
I'm not sure if this is something that you want to test during development, or monitor has feedback from real clients. It could be possible to run the above Javascript has a background thing and then send AJAX messages back to the server to report the performance for a visitor.
Another script I found attempts to measure CPU performance, but I don't know how good it is.
http://blog.pothoven/2007/12/performance-based-web-app-functionality.html
I wouldn't suggest using it on a production server, but Firebug has Javascript performance analysis tools. http://getfirebug./javascript
You can use the Google Chrome Web Inspector, specifically the "Profiles" panel. Here's some more information on it...
http://jtaby./2012/04/23/modern-web-development-part-1.html#The%20Profiles%20Panel%20
版权声明:本文标题:jquery - How can I measure the performance of a javascript heavy webpage on a client computer? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744579161a2613813.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论