As for the recommendation to use his custom testing/benchmarking library: don't! It's based off an old version of jQuery, it duplicates functionality of better-maintained libraries, and it opens up a new vector for arbitrary code evaluation/execution ($.bm);
JQuery Performance Tips Cheat Sheet
21–24 of 24 posts
Re: JQuery Performance Tips Cheat Sheet
#22Man... this is full of crazy talk: For better performance you can use direct functions like $.ajax() than $.get(), $.getJSON(), $.post() because the last ones are shortcuts that call the $.ajax() function. I've never written an app where the overhead of $.getJSON has been any kind of bottleneck. Don’t forget about using .data() function to store stuff for your elements How is this a performance tip? Sometimes it’s fa…
As with most development, use good practices. But then at the end of the day, profile your application to find the actual bottlenecks.
Re: JQuery Performance Tips Cheat Sheet
#23The #id selector performance tip is definitely true, but in single-page interface you never know which DOM elements may be floating around on a page, which would go against the one id per page principle.
Re: JQuery Performance Tips Cheat Sheet
#24It would be nice to see measurements on how much less time and memory the more performant techniques take compared to their less performant counterparts in realistic scenarios. Doing so might indicate a better ranking of the tips given. For example, the DOM insertion tip -- which drastically improves performance over the naive implementation -- is tip 9, and is probably far more useful than tips 4 (Optimize selectors…
Seems like people are testing the sort of things measured in this article at the moment too eg.: