Serious JavaScript performance boost for Firefox 3.1
Posted by Percy Cabello on August 22nd, 2008 • Tags:
ShareThis

Mozilla has just landed a new JavaScript optimization feature to Firefox 3.1 development code base (Shiretoko) that effectively enhances JavaScript-based web applications performance by a 2X – 20X fold compared to the already-severely-pumped-up Firefox 3, according to a variety of JavaScript performance tests ran and published by Mozilla’s Brendan Eich.

TraceMonkey tracks the JavaScript code your page is running, identifies pieces that are repeatedly used, and translates that code (interpreted) to an a machine ready state (compiled) that runs much faster the next time it is needed. As this repetitive executions (loops) are very common, the performance gains are huge.

But the best way to understand it is to see it in action. Mozilla’s VP of Engineering, Mike Schroepfer, created a simple JavaScript image editor that lets you adjust a picture’s contrast and brightness with a couple of sliders. With a today’s nightly and TraceMonkey disabled (currently the default as it is still buggy), there is a very noticeable delay while sliding. Turn it on (javascript.options.jit.content = true in about:config) and the thing works just as you would expect: smoothly.

Seems like Firefox 3.1, targeted for first quarter 2009, has just got its must-upgrade feature. With just a couple of months in the wild, Firefox 3 is already starting to look old.

For test details and TraceMonkey background, check Brendan Eich’s TraceMonkey: JavaScript Lightspeed.

Comments
simon said on August 23, 2008, 4:53 am:

what’s up with this?:

TraceMonkey: JavaScript Lightspeed

Melhoramentos de performance sérios no Firefox 3.1 | Open Mania said on August 23, 2008, 12:04 pm:

[...] já anda a ficar velho apenas com uns meses de existência (versão final). Mais informações no MozillaLinks e no blog do Brendan. Se gostou deste post então por favor subscreva ao RSS feed do Open Mania. [...]

Carter said on August 23, 2008, 1:34 pm:

In what way do you think Firefox 3 is already starting to look old?

Yeah said on August 24, 2008, 3:07 am:

Firefox 3 is also Firefox 3.1
Firefox 3.0 =! Firefox 3.1

Google Chrome joins Browser Wars II – Mozilla Links said on September 2, 2008, 12:07 pm:

[...] an open source JavaScript engine and virtual machine that uses optimization techniques similar to TraceMonkey (it compiles most commonly used code to avoid slow code interpretation).It also uses precise [...]

Firefox 3 Alpha 2 reviewed – Mozilla Links said on September 5, 2008, 10:11 pm:

[...] TraceMonkey, the JavaScript optimization module that brings outstanding performance improvements to most web applications is not included in this release because of some nasty bugs, but is expected to be added soon. [...]

Google Chrome Sucks – pwnt.be said on September 14, 2008, 3:03 pm:

[...] upcoming Firefox 3.1 will finally have private browsing, as well as a revamped tab switcher and the best JavaScript performance out there. It’s not over yet, kids. Age: 2 minutes and 44 seconds Tags: Android Apple AwesomeBar [...]

2 Betas Planned For Fx 3.1 « Firefox Extension Guru’s Blog said on September 18, 2008, 11:25 pm:

[...] TraceMonkey’s capabilities into the DOM and other parts of our [...]

Odprta koda – Prosto programje » Firefox 3.0.2 – nova različica said on September 24, 2008, 2:26 am:

[...] mogočna posodobitev na področja JavaScript-a. [...]

Firefox 3.1 beta 1 released and reviewed – Mozilla Links said on October 14, 2008, 5:07 pm:

[...] TraceMonkey is a new JavaScript optimization technique that significantly improves web applications [...]