Tags

, , , , , , ,

The next version of Mozilla’s Firefox web browser is 3.1 and its going to have quite a few enhancements in it. Some of the features that are planned are:

  • Multi-threading support in JavaScript programs
  • Built-in ability to play Ogg Vorbis music files
  • Built-in ability to play Ogg Theora video files
  • Improved document object model
  • Significant performance enhancement in the JavaScript execution engine through the incorporation of TraceMonkey

The last one is going to have a major impact and can very well pave the way for the resurrection of JavaScript based web applications, a breed of applications that has been steadily losing market share to technologies like Adobe Flash/Flex and Microsoft Silverlight.

JavaScript has been around for a long time now and is used to enhance user experience of a web application. However it has been plagued with browser incompatibility and performance overheads. Mozilla plans to minimize the performance impact by using TraceMonkey. According the Mike Shaver, Mozilla’s interim vice president of engineering, with TraceMonkey the JavaScript performance nearly doubles compared to Firefox 3.0 that uses SpiderMonkey as the JavaScript engine. Also, with TraceMonkey, Mozilla brings 3D graphics and image editing capabilities to the JavaScript arsenal.

The following graphic shows the performance enhancement:


The figures seem to be to good to be true.

TraceMonkey is an amalgamation of SpiderMonkey and a technique called tracing developed at the University of California at Irvine by Andreas Gal and others. TraceMonkey is a just-in-time compiler that creates the binary file on the fly. The novelty about TraceMonkey is that it concentrates on translating selected part of the JavaScript code that are more performance intensive. This it does through tracing and recording program execution.

TraceMonkey is already built into the developer versions of Mozilla Firefox 3.1 but disabled by default.

Well the browser wars are back again and this time its going to be a lot tougher. Microsoft’s Internet Explorer had initially steamrolled Netscape’s Navigator through an enhanced user experience and developer experience. They offered DOM elements and JavaScript calls that let developers do cool stuff with their HTML and JavaScript code. Netscape could never measure up and died. Of course Microsoft’s dominance on the desktop helped the cause.

If Mozilla’s TraceMonkey offers this kind of a serious performance boost, it won’t be surprising to find developers writing applications that targeted Firefox specifically, just like those innumerous sites that would function properly only on Internet Explorer.

If Mozilla delivers on its promise, then the day is not far when we would be seeing applications that have a disclaimer saying “Please use Mozilla Firefox 3.1 for proper function”. And oh, by the way, Adobe and Microsoft, please take note.