Friday, February 29th, 2008

Components of Browser Performance

Category: Browsers, JavaScript

If you could increase the performance of the JavaScript engine that would be great, but it is only one cog in the machine that needs to improve. We have long seen issues to to DOM bottlenecks and the like, and John Resig has gone through and diagramed the pieces (above) and wrote:

What’s interesting about all of this is that a lot of attention is being paid to the performance of a single layer within the browser: JavaScript. The reality is that the situation is much more complicated. For starters, improving the performance of JavaScript has the potential to drastically improve the overall performance of a site. However there still remain bottlenecks at the DOM, CSS, and rendering layers. Having a slow DOM representation will do little to show off the improved JavaScript performance. For this reason when optimization is done it’s frequently handled throughout the entire browser stack.

Now what’s also interesting is that the analysis of JavaScript performance can, also, be affected by any of these layers. Here are some interesting issues that arise:

  • JavaScript performance outside of a browser (in a shell) is drastically faster than inside of it. The overhead of the object models and their associated security checks is enough to make a noticeable difference.
  • An improperly coded JavaScript performance test could be affected by a change to the rendering engine. If the test were analyzing the total runtime of a script a degree of accidental rendering overhead could be introduced as well. Care needs to be taken to factor this out.

So while the improvement of JavaScript performance is certainly a critical step for browser vendors to take (as much of the rest of the browser depends upon it) it is only the beginning. Improving the speed of the full browser stack is inevitable.

Posted by Dion Almaer at 2:02 am
1 Comment

4.2 rating from 74 votes

1 Comment »

Comments feed TrackBack URI

Performance improvements made in one area can only affect total performance limited by that areas frequency, this is called Amdahl’s law: Just thought I’d throw that in :)

Comment by Anonymous — February 29, 2008

Leave a comment

You must be logged in to post a comment.