tags:

views:

21

answers:

1

So I currently have an application that is fairly complex with large-scale animations and lots of AJAX requests. When lots of stuff is happening at once, the performance tends to suffer (to approx 5-10 FPS when lots of stuff happens at once) on browsers that are not Chrome, and it gets worse when users are running on the paging file.

So I'd like to offer a "basic" mode, and all it does is converts animations into simplified forms. For instance, .slideDown effectively becomes .hide. I'd like to accomplish this without writing my own custom .slideDownOrHide function so that I can avoid major refactoring.

What's the best way to go about this?

IE compatibility is not necessary.

+2  A: 

I found a convenient shortcut by snooping into the implementation of jQuery.speed. The gist of it is just to set jQuery.fx.off = true, and it fixes jQuery.speed to set all durations to zero regardless of the argument you pass into it. Turns out it's actually in the Public API.

Steven Xu
Now the question comes up as to how to present this to the user. Is there any way to "detect animation performance"? I'd want to make the "basic" button prominent if the user is experiencing bad performance, but I don't want to have it as a distraction for someone in Chrome with 8GB of memory.
Steven Xu