

5 jQuery performance tips - codepunker
https://www.codepunker.com/blog/five-jquery-preformance-tips

======
gergesim
I'd really avoid encouraging people to build up strings of html that you
simply append to the DOM. This is a great way to run into XSS issues. Although
the live DOM is slow,using a DocumentFragment (even if it's completely
abstracted away with jQuery) is the right way to make modifications in bulk.
The AJAX example is pretty convoluted so I'm not sure what you're proving, but
building onto the promise chain seems like a better and much more readable
code. Regarding ID selectors, querySelectorAll really minimizes the huge
performance gain of id selectors only, and that's exactly what's used on any
modern browser when you do a $(".foo")

