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
Add a ment  | 

4 Answers 4

Reset to default 2

You 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

本文标签: jqueryHow can I measure the performance of a javascript heavy webpage on a client computerStack Overflow