JavaScript libraries such as jQuery provide functions that make it easy for web developers to achieve certain things, e.g.: change the style of certain DOM elements. Most of these libraries therefore provide methods called $, $$ or find that allow finding DOM elements by ID, Tag Name, CSS Class Name or specific DOM attribute values.
The following is a screenshot of the Performance Report analyzing the Boston Bruins Page on msn.foxsports.com using Firefox 3.6. The Performance Report highlights 3 interesting things:
- High Client Time (3.5 seconds in JavaScript execution until the Page was Fully Loaded)
- 39 JavaScript! blocks that executed longer than 20ms
- 38 calls to Spry.$$ for looking up an element by Class Name with an average of 80ms execution time
Continue reading the full blog and learn how upgrading your JavaScript libraries can speed up page load time by seconds