High-Performance Javascript

Performance is in the details.

JavaScript and the browsers that run it have come a long way since JavaScript was primarily known as the enabler of endless pop-up windows users encountered when visiting some, well actually, a lot of site in the late 1990s.

Today there is a mini arms race between the major browser creators to produce faster and faster JavaScript engines with names like V8, Carakan and SquirrelFish, but of course, they can only do so much with badly-written code. High-Performance JavaScript is about techniques and strategies to help eliminate performance bottlenecks in your code.

Though the book does cover a lot of the commonly-known JavaScript performance tips, it also goes beyond them. The book is sprinkled with a lot of details about how various browsers run JavaScript, which can be very helpful when trying to figure out why one browser (and not always Explorer!) is running your code slower than expected. For instance, there’s a whole chapter on string processing that’s a must-read. Other chapters cover designing responsive interfaces (including using the WebWorkers available in Firefox, Chrome and Safari), an Ajax chapter, as well as general programming practices.

As an aside, the book deals only with JavaScript in the web browser and much of the material is only relevant in that content; however, the performance issues are likely the same for JavaScript used in server or other environments (e.g. .NET or server-side).

Finally, the book wraps up with two chapters on deploying JavaScript on a production website and some tools to debug, profile and test websites. Like the other libraries and tools mentioned in the book, some of these will be known to experienced programmers, but some will be new.

See also  Create Great iPhone Photos