3 ms·
There's a lot of practical things people can do to make their JS code faster, and a bunch of impractical things too (like unrolling loops). But based on our res
by ahoyhere 15y ago
There's a lot of practical things people can do to make their JS code faster, and a bunch of impractical things too (like unrolling loops). But based on our research/experience, a huge percentage of JavaScript-related web app slowness is actually caused by inefficient DOM structures and CSS styling. Believe it or not, simple DOM mistakes can dramatically slow down insertions, event handlers (like on-click), any kind of iteration (obviously) as well as animations.
That's why we open sourced our DOM performance inspection bookmarklet, DOM Monster:
http://mir.aculo.us/2011/01/09/the-dom-monster-is-now-open-source/ http://mir.aculo.us/2011/01/09/the-dom-monster-is-now-open-s...
If you liked this presentation, you might enjoy the book I co-wrote with Thomas Fuchs (of Scriptaculous, Prototype.js, Emile, Zepto, & Microjs fame): http://jsrocks.com http://jsrocks.com
- becomevocal 15y agoAwesome. Checking out DOM Monster right now. Thanks!