Common causes of slow performing jQuery and how to optimize the code?

Posted by Polaris878 on Stack Overflow See other posts from Stack Overflow or by Polaris878
Published on 2010-04-22T18:04:06Z Indexed on 2010/04/22 18:13 UTC
Read the original article Hit count: 207

Hello,

This might be a bit of a vague or general question, but I figure it might be able to serve as a good resource for other jQuery-ers.

I'm interested in common causes of slow running jQuery and how to optimize these cases.

We have a good amount of jQuery/JavaScript performing actions on our page... and performance can really suffer with a large number off elements.

What are some obvious performance pitfalls you know of with jQuery? What are some general optimizations a jQuery-er can do to squeeze every last bit of performance out of his/her scripts?

One example: a developer may use a selector to access an element that is slower than some other way.

Thanks

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery