Microsoft: Browser Speed Not All About JavaScript

Microsoft: Browser Speed Not All About JavaScript
While the race to make the fastest browser JavaScript engine continues at a heated pace, Microsoft senior product manager Pete LePage reminded the audience at Microsoft TechEd, held in New Orleans this week, that the speed of JavaScript execution is only one aspect of browser speed, and not particularly a dominant one at that.

"Performance is really a multipart system. It is not something that if you just have a really fast JavaScript engine, then your browser will be fast. Not always will performance be dependent on the JavaScript engine," he said.

LePage's presentation focused on the latest developer edition of Internet Explorer 9.

To make his point, LePage, who works on the Internet Explorer team, showed the results of an analysis of four sample Web sites that were studied by the IE developer team. Two were Excel Web applications, and two were unnamed news sites.

For the Excel Web apps, executing the JavaScript took less than 10 percent of the total workload to render a page. For the two news sites, the JavaScript execution took between 20 percent and 35 percent of the workload.

In all these cases, JavaScript execution was a big, though not dominant, portion of the work needed to display a Web page or Web application. Other chores that chewed up a lot of processing time included rendering, which took about 20 percent of the time in each case, and layout, which took anywhere from under 10 percent to over 30 percent. Formatting, CSS and HTML parsing also required some attention as well.

"If we can get JavaScript engine faster, which is important, then we have to get other things faster as well. We have to get rendering faster. We have to get the performance of the browser in general faster," he said.

Most of the time, the effectiveness of the JavaScript engine is measured by the SunSpider JavaScript Benchmark. He noted in these cases, "It is an interesting test, in terms of looking at how fast a number of things happen, but it doesn't necessarily tell us how fast the browser is."

This is not to say that the IE9 JavaScript engine is a slouch. Microsoft is revamping its JavaScript engine for the IE 9 release, making a number of changes that should speed performance.

For one, the new JavaScript engine starts to interpret the code as soon as it is downloaded, and can use additional cores of the user's computer to compile the script into byte code so then when it is called, it will run very quickly. "Once we switch to compiled code, the code is running significantly faster," He said.

Perhaps most notably, the browser will also be able to offload visual rendering duties to GPUs (graphics processing units).

To demonstrate the speed of the new browser, LePage put it through the SunSpider paces, comparing it to the speed of IE8 under the same test. The IE8 browser took about 3800 milliseconds to complete the benchmark. In contrast, Platform Preview 2 had executed the test in under 500 milliseconds. This beats the scores of both Firefox 3.6 and 3.7, LePage noted.

As an example of how both the new JavaScript engine and GPU offloading speeded IE9, LePage showed a demonstration, from the Microsoft test site of some JavaScript-based browser icons that spun around. In IE9, they spun smoothly, at 60 frames per second (FPS), according to LePage.

Then, LePage showed the same demonstration in Google Chrome, "which isn't compiling the code" he said, and wasn't using hardware-assisted acceleration. This same page struggled along at about 2 FPS.

LePage also talked about how compliant IE9 would be with the nest generation HTML5 and related set of Web standards now being developed. In his keynote earlier this week, Bob Muglia, Microsoft president of software and tools, proclaimed that IE9 would support HTML5. LePage offered a more nuanced view of that statement, though.

The browser would support much of HTML5, LePage said, though he would not say definitively that IE9 would support all of the specification, mainly because the specification is still in a state of flux. The current specification for HTML5, when printed out, is over 1,100 pages, up from 900 pages in February, he said.

"We're putting as much effort into making sure we get as much HTML5 support as we can," he said, noting that it is still be revised, and will be for some time.

LePage also would not comment on if IE9 would support Canvas, or when the final release date of IE9 would be.

LePage plans to post a copy of his presentation slides on his blog.

Subscribe to the The Advisor Newsletter

Comments