Web development , php , ajax , symfony, framework, zend
In: web resources
1 Mar 2010
Mozilla’s Firefox web browser was one of the first to optimize for today’s JavaScript-heavy web pages. Mozilla’s new Tracemonkey JavaScript engine — released with Firefox 3.5 — put the browser at the top of most page rendering speed tests. But lately, Google Chrome, Apple’s Safari and the coming Opera 10.5 have been beating Firefox at its own game.
Mozilla is hoping to change that with some new improvements to Tracemonkey that promise to make Firefox even faster — particularly on JavaScript-heavy websites like Gmail or Facebook.
The new project — JagerMonkey, as it’s known — is built on top of Tracemonkey and borrows its assembler from Apple’s open source Nitro JavaScript engine. As JagerMonkey programmer David Mandeli writes on his blog: “we know [Nitro] is simple and fast from looking at it before… it’s open-source, and it’s well-designed C++, so it was a great fit.”
The goal of JagerMonkey is to cover a couple of blind spots in Tracemonkey’s JavaScript rendering process. Most JavaScript can be compiled “just in time,” that is, optimized by turning it from JavaScript into much faster native code. When that’s possible, Tracemonkey’s performance matches that of Chrome, Safari and Opera.
However, not all of the web’s JavaScript can be converted to native code the way Tracemonkey currently works. Mandeli has a detailed explanation of what sort of code doesn’t work and why, but the short story is that when Tracemonkey doesn’t kick in, Firefox is still rendering that code at the same speed it was in 2007 — in other words, very slowly by today’s standards.
JagerMonkey will change that, handling the code that the existing Tracemonkey engine cannot.
Of course it will be some time before JagerMonkey makes it into Firefox proper. In fact, as of right now it isn’t even in the Firefox nightly builds. If you really must try it for yourself right now, you’ll find a link to the source code on the Mozilla wiki.
So far, the project doesn’t have a roadmap and the wiki page indicates that there are still many optimizations to be done, but when JagerMonkey finally lands, it may well put Firefox back on top in the web browser speed wars.
Photo: Wikimedia Commons, PD
See Also:
This blog delivers stylish and dynamic news for designers and web-developers on all subjects of design, ranging from: CSS, Ajax, Javascript, web design, graphics, typography, advertising & much more. Our goal is to help you communicate effectively on the web with an engaging website or functional interface.
4 Responses to Firefox Borrows a Bit of Safari’s Magic to Speed Up JavaScript
Yahoo!Answers
March 5th, 2010 at 6:23 pm
Good answer.
Let me give another one: try to breath light and use air to see.
lucifer
March 7th, 2010 at 10:09 pm
change your diet the food you are eating is to rich for you
adderek
March 11th, 2010 at 11:05 am
Yes, that is possible. Check fasm (flat assembler) and samples that are available for it.
While some things might be simple (like calling the api) – some might become difficult to obtain. I suggest that you use ANSI C and C++ with addition of assembler.
Also note that there are not that many sample codes for DX10 and assembler (but you should be able to get it working without problems).
Good luck.
Martyr2
May 17th, 2010 at 6:54 am
Google Earth can run on firefox provided you have the plug-in installed and operational. You also need to setup firefox as your default browser…
To set this go to Tools>Options and in the General tab in Options Window select "Firefox should check to see if it is default browser when starting" in "Default Browser" Groupbox
Then that should be all you need to get up and running!