jQuery Proven Performance Tips & Tricks (Slides) from jQuery London

Understanding the factors that impact performance is essential for the development of memory and data-intensive apps, especially those relying on JavaScript and DOM-manipulation libraries like jQuery. In this talk, I present ten useful tips and tricks that can help you write better jQuery code as well jsPerf tests that prove each of the approaches presented are in fact better than many of the alternatives.

To view the slides for this talk, click here.


  1. Great work Addy!

    Couple notes:

    1. This isn't really consequential, more just about semantics. and $(this).attr('id') will return the same value but aren't actually doing the same thing. At a low-level this.getAttribute('id') would be equivalent to $(this).attr('id'), but since the attribute stays up to date, it doesn't matter which you retrieve, so I would still say to do

    2. On slide 67, it is good to note that $.data is faster, but it cannot be passed a selector, only a node. So $.data( elem, key, value ) where elem is already an element.

    But again, nice collection!

    • Thanks, Timmy! :)

      Really appreciate the extra notes on and $.data. You're absolutely right on both counts.

      Going to be giving this talk again soon so I'll be sure to mention those in the updated slides.


    • Hey Adar!. I'll certainly consider it. The main reason I try not to enable downloading is that I usually update my slides depending on whether a new or better test/tip is available or something like a minor code bug needs to be corrected. By keeping them online, I can be sure that anyone reviewing them is getting accurate information but I'll do my best to provide the best of both.

  2. Great post Addy!

    One tiny thing though @ slide 82: It should read

    $('#input_' + key).val(checked ? defaultSettings[key] : '');

    as you have not assigned the variable v.



Leave a Reply

Required fields are marked *.