Writing Efficient JavaScript

Web Performance
Location: Regency 2 Level: Novice
Average rating: ****.
(4.26, 19 ratings)

This talk walks through several techniques for speeding up JavaScript. The information is a presentation of the topics discussed in my chapter for the book, Even Faster Web Sites. Topics include:

  • Managing scope – learn why scope is important and how to manage it for optimal performance.
  • Data access – learn what types of data access take longer in JavaScript and how to mitigate their effects.
  • Flow control – learn how to use “if” statements and loops efficiently.
  • Avoid long-running scripts – learn what causes the browser to stop executing your code and what to do to avoid it.
Photo of Nicholas Zakas

Nicholas Zakas


Nicholas is the author of Professional JavaScript and Professional Ajax, a contributor to the upcoming book Even Faster Web Sites, as well as principal front end engineer on the Yahoo! homepage.

Comments on this page are now closed.


Picture of Nicholas Zakas
Nicholas Zakas
06/23/2009 3:43am PDT

Thanks to the Velocity folks for embedded my presentation on this page!

Picture of Mark J. Levitt
Mark J. Levitt
06/23/2009 3:01am PDT

@Pavel, it’s now on this page too!

Pavel Senko
06/22/2009 5:18pm PDT
Pavel Senko
06/22/2009 5:14pm PDT

Hi Nicholas! I couldn’t find your presentation online; can you please let me know where I can get it?


  • Keynote Systems
  • Google
  • Shopzilla
  • Aptimize
  • Facebook
  • NeuStar
  • Rackspace Cloud
  • Schooner Information Technology
  • SoftLayer
  • SpringSource
  • Sun Microsystems

Sponsorship Opportunities

For information on exhibition and sponsorship opportunities at the conference, contact Sharon Cordesse at scordesse@oreilly.com

Download the Velocity Sponsor/Exhibitor Prospectus

Media Partner Opportunities

Download the Media & Promotional Partner Brochure (PDF) for information on trade opportunities with O'Reilly conferences or contact mediapartners@ oreilly.com

Press and Media

For media-related inquiries, contact Maureen Jennings at maureen@oreilly.com

Velocity Newsletter

To stay abreast of conference news and to receive email notification when registration opens, please sign up for the Velocity Conference newsletter (login required)

Contact Us

View a complete list of Velocity contacts