O'Reilly logo

JavaScript® Programmer's Reference by Alexei White

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 25. Performance Tuning

As your expertise grows and you increase your use of JavaScript in your applications, you're going to be thinking more and more about how to squeeze the most performance out of the browser. Performance becomes a topic of concern as pages become laden with burdensome DOM manipulations and large JavaScript files for the user to download. As a developer, you are always being held to the abstract and lofty goal of high performance, but even when you don't have users or clients breathing down your neck, it will be your goal to use best practices to make your scripts as quick as they can possibly be. There are a lot of ways to approach this problem. Some of them are easy and have a huge impact like using gzip compression, and some of them are more complicated and nuanced like improving the performance of certain DOM manipulations. This is why good JavaScript developers are sometimes thought of as craftsmen in a way, weaving together the DOM, CSS, HTML, and script in a way that's both responsive and engaging for the user.

This book has given a lot of the tools you'll need to become a great developer, and with technologies like SquirrelFish Extreme and V8 beginning to get adoption, browsers are more optimized than ever with rich application development. Along the way, I've tried to alert you to best practices for getting the best performance out of a particular approach, but there is always a way to tweak a loop or animation to make it better. Optimization ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required