Main Content

jQuery Anti-Patterns for Performance and Compression

About the Talk

September 12, 2009 8:00 AM

Microsoft Cambridge

Microsoft Cambridge

If you've seen the results from TaskSpeed, you know that the sexy syntactical sugar of jQuery comes with a few performance disadvantages. jQuery makes it quite easy for you to write some pretty inefficient code, so we'll discuss how to develop in a terse style but with the best possible performance.

We'll cover:

  • Why everything you've learned about the context argument is wrong.
  • Optimal code architecture approaches, e.g. Module Pattern, Constructors, Object Literal
  • Why your selectors in jQuery shouldn't match your ones in CSS
  • Where Sizzle doesn't optimize where you'd think it would
  • How to write jQuery plugins that are blazingly fast

In this session we'll also touch on how to prepare your code for a run through the YUI Compressor. Using real-world examples, we'll reduce the minified size of scripts by 50% using techniques that retain readability and maintainability.

Ratings and Recommendations

Avg. Rating

Average based
on 30 ratings

comments powered by Disqus