John Resig

JavaScript Evangelist, Mozilla Corporation

Holistic Performance
27 minutes, 12.4mb, recorded 2011-06-16
John Resig

In a jQuery project, speed is a goal, but not at the expense of browser performance, CPU usage, battery demand, memory requirements and bandwidth consumption. All these factors must be considered together in a holistic manner. Resig uses a JavaScript project to illustrate this approach. Part of the project involved a search for the proper Trie and selection of a Succinct Trie to optimize file size and data structure. It also did not need to be turned into a JavaScript object. This is an example of the holistic approach. JQuery is running on 44% of web sites so it is important that any JQuery project runs efficiently because that percentage indicates the potential number of users is large.

Several tools help determine project effectiveness. DynaTrace can analyze project applications on Internet Explorer and Firebox browsers to see things like CPU usage over time. Another tool is JSPerf to gather data on a test run multiple times over about five seconds, to determine a base line for speed. Then tweaks are applied and more tests run to determine which changes produce the best result. 

A key concept is not to slow down Internet Explorer. If you can keep performance good on slow-performing IE, then you can expect to do well on other browsers. Browserscope tied into JSPerf helps determine this. A test case is applied by dozens of people and the results dumped by JSPerf into Browserscope where the comparative results for many of browsers can be seen. The best way to evaluate performance over time with these projects is to compare your current with past performances. "We are our best competition," Resig states, and people are the key element in any of these operations.  Always push for better code.

John Resig is a frequent guest speaker at companies like Google and Yahoo! and has presented at many conferences related to web technology, including SXSW, Webstock, MIX, and Tech4Africa. He is also the author of a widely read blog,, moderates a large number of 'subreddits' on Reddit and most recently published Secrets of the JavaScript Ninja. He is twenty-eight, born in Boston, MA, and attended the Rochester Institute of Technology. 



This free podcast is from our Velocity Conference series.

For The Conversations Network:

  • Post-production audio engineer: Jamie Rinehart
  • Website editor: jim vandiver
  • Series producer: Sathyaish Chakravarthy

Photo: Vimeo