views:

17

answers:

1

I am looking for information concerning a proven process to interrogate the current user's client, and perhaps benchmark a code piece, to determine how effectively the client is executing certain types of code.

Obviously writing code as efficiently as possibly is the constant goal. However certain features and effects tend to degrade the experience on lower end machines. With benchmark information, it could be possible to disable certain effects (fading, etc) on a user by user basis, to increase the experience of a property/app.

If you don't know of any information on this, do you have ideas on how it could be done?

Thanks

A: 

Run your animation using setInterval at a reasonable frame rate (say, 30 frames per second). Each time you render a frame, store the time somewhere. After one to two dozen frames, check the framerate you're actually getting, based on your stored array of times. If it's significantly lower than the frame rate you asked for with setInterval, you're probably pushing the machine too hard, and should disable your animations.

Brian Campbell