Firefox 3.5: The need for speed
By Scott M. Fulton, III | Published July 3, 2009, 3:50 PM
All throughout the testing phase of Mozilla's Firefox 3.5, we've been tracking the often very granular, very minor speed tweaks that developers have been making to the browser -- a one percent improvement here, a two percent dip there. And some of our readers have been wondering why. With computers that are already fast enough for many consumers, will it matter much that Google Chrome completes some operations in two blinks of an eye versus Firefox's three blinks?
We posed those questions to two of Mozilla's browser engineers: Senior Director for Platform Engineering Damon Sicore, and infrastructure developer Vladimir Vukicevic. Their answers include items we can share with you directly, and demonstrate to you explicitly.
A few percentage points here and there is the complete difference between whether some of the browser's new functionality works fluidly or doesn't really work at all. One test you can see for yourself is on one of Vukicevic's test pages: a high-contrast landscape photo complete with sliders that control the photo's relative brightness and contrast. Live image manipulation isn't particularly exciting, especially for folks who see this sort of thing in Paint Shop Pro.
But slide these two sliders around for yourself in Firefox 3.5, and watch how fluidly the browser responds to your motions, producing updates as fast as 12 frames per second on Betanews' quad-core test system. Then try this same page on Firefox 3.0, or something even older.
"What's important here is how fast the actual adjustment occurs, and how many frames per second you can get while doing this," Mozilla's Sicore told Betanews. "With Firefox 2, you get 0.18 fps, which is almost unusable. Your laptop will heat up, and it doesn't really necessarily enable you to make the changes you want to the actual image. But as we use Firefox 3.5, we can get 8.1 fps, and [even more increases] by tuning the JavaScript just a little bit." Betanews tests estimate that Firefox 3.5 performs with about 251% the speed of the final stable Firefox 3.0.11, in repetitive benchmarks. Those are the tools engineers use to reveal areas of the JavaScript engine that require improvement. In this particular test, the differences are way beyond 251%. In fact, with Betanews tests of this same page using Firefox 3.0 on the same system, after playing roughly, we were able to freeze the browser completely.
"One of the things we've been trying to do is figure out, what are the kinds of actions and applications that we want to see show up on the Web, that are greatly helped by having a faster JavaScript engine?" remarked Vukicevic. "What are the things you couldn't do before that you can now, once you have a significantly improved JavaScript engine? We use [benchmarks] to judge either peak performance, or performance under very specific conditions."
"In the TraceMonkey engine itself," Sicore added, "inside of JavaScript, we've focused on key performance benchmarks that we feel will reflect how the Web is being used today by people."

Another extraordinary demonstration of what a tad more speed makes possible, is the inline video/graphics injection demonstration we unveiled last week. There, an inline video played by 3.5's new inline video rendering engine can receive live overlays from any of six other graphical sources on the page, without slowing down the movie. This is the kind of mixing that has historically been the realm of fully compiled applications. But this is JavaScript, Web code, stuff you get online.
When you're developing a compiler or a language interpreter (which isn't just the engine for Firefox but also its "chassis," if you will), there is a performance threshold below which some functions such as this are not possible. Making Web engines faster by tenths of a degree makes feasible new classes of online applications that could not happen no matter how much faster the underlying computer becomes.
As one Betanews reader named Nick asked me via e-mail earlier this week, though, does that window of opportunity have a ceiling on the opposite side? Or as Nick put it: "I think it's great that all the main browsers are working to improve performance. The consumer actually wins! The improvements over the past five years have been so dramatic. But now, are we comparing three cars and how fast they can go from 80 to 100 mph, but the speed limit is only 65? In other words, can the human eye notice anything below a half-second? Another way to put the question, does Firefox, Chrome and Safari now get a A+ in performance, IE 8 get a 8 and IE 7 gets a C and IE6 gets a D-minus? [And] if so, is A+ the best they can get?"
If the speed limit were something set by the human eye alone, then perhaps the answer to this would be, "Yes." That's if we presume that all that a Web browser will ever do is recite Web pages like the one you're reading now. But as Mozilla and its competitors understand, that's not all the Web will be. For too many years, the speed of everyday processors has been locked away from the novice or experimental developer, only to be tapped through low-level languages such as C++ and C#. In the beginning of the computing era, BASIC was the way we learned to use our machines; today, typical users are no more compelled to program their own applications than to build their own automobiles.
Making JavaScript faster changes this equation, shifting the balance more toward where it used to be when the craft of computing was conceived. The feasibility of doing things like live video mixing through high-level languages (those that use interpreters) sets new speed targets that developers at Mozilla and Google, and evidently Apple and Microsoft (and our Opera readers will chime in at this point), will endeavor to reach. This week, Mozilla has reached that bar; I have no doubt that Google, whose Chrome browser already has a faster engine, will meet this challenge in due course.
But when the next class of applications makes itself feasible on a higher level (multiplayer online 3D games, anyone?), then suddenly "A+" will become more like "C." And the competitors in that field (assuming no one's messed up the Web browser market a second time) will endeavor to meet this new target. There may be a dozen or so people who don't really care, at least not at first, because Betanews will render pretty much the same in whatever new browser that comes along. But there will be a different class of developer, one who isn't as pleased with Nissan's 350Z as with the 370Z, who will raise his own expectations and who will contribute to the act of setting the bar higher.

Funny, I don't think there was ever any argument that the improvements in 3.5 vs. 3.0x were worth noting and benchmarking. It's the daily build testing that seems largely pointless. RC1 to RC2 brings a few percentage points difference? *That* is what's irrelevant. Yet this article claims the 3.0x to 3.5 speed boosts are precisely what justify such close scrutiny between *pre-release* versions. Sorry, that doesn't add up.
I'd like to see an initial test of any major new speed improvements (new javascript engine, etc.), and then a final test of the actual release product. The in-betweens seem extraneous unless there is clearly a major change to justify it. Yes, this is "beta"news, but having a whole new article on every beta and RC's performance characteristics is hard to justify as being worthwhile.
Score: 0
|the latest opera 10 beta seems faster then FF3.5 IMO
Score: 0
|How about improving the memory management in Firefox?
When I've got Firefox open with multiple tabs, it is the largest memory consumer on my machine (some times exceeding >.5G), which then completely slows down my machine (including many javascript scripts running at the same time).
How about adding an option to 'suspend tab' ?
Perhaps, suspend tab when it's not in focus?
Score: 1
|Funny how this only works well on firefox 3.5. Tried it on chrome 3.0.190.4 beta which supposedly has a much better performance index than firefox 3.5 and it was really jerky, worked nice and smooth on firefox though.
Score: 0
|Hey Scott,
In addition to the bars for performance, how about adding a bar chart showing the Acid test scores for standards compliance? The funny, well, not so funny, part is the chart would look the same....IE8 getting around 20% with all the others at or near 100%
Score: -1
|Actually, fatty, this isn't a bad idea at all, and I think the only reason you were getting voted down on this is because folks out there just can't stand to be one-upped. Next time out, I'll remember to include an Acid3 chart.
Just to fill you in, both stable and developmental versions of Chrome are running 100% in the Acid3, while Firefox 3.5 is running 93% and 3.6 alpha at 94%. IE8 continues bringing up the rear at 20%.
-SF3
Score: 0
|"But there will be a different class of developer, one who isn't as pleased with Nissan's 350Z as with the 370Z, who will raise his own expectations and who will contribute to the act of setting the bar higher."
Just got yourself a nice new shiny motor and wanted to share eh ? Me, I've got a 1960 white Mark 2 Jaguar, rubbish brakes, frighteningly bad at cornering, a well maintained push bike can out accelerate it, but it looks unbelievable magnificent just standing still, and folks admire it, and I clean it daily, and like most of my friends I now use a Netbook. Not true that bit about me using a Netbook, Jaguar owners use really big powerful Laptops. But most folk don't care how fast a browser is, except the gang who hang out here, we care !
Score: 0
|Nah, just wishful thinking on my part...I've owned two Zs in my life, the second being an '84 280ZX that I drove until the body pretty much rusted out in 2003 (big Datsun tradeoff in those days was that Zs had a great engine and a body made of duct-taped milktoast). Still looked great sitting in the driveway though. (Until the duct tape started showing.)
-SFZ
Score: 0
|Of course, the irony is that there is still a user base that does not want the insecurity that javascript brings, especially ones that are crossing the ethical borderline of running into the user's privacy space on their machines. Chrome has already stepped into this ethical engineering question - of not providing users even the option to turn it off.
Score: 0
|The option is there. You close & / or Uninstall Chrome & just use another Browser ;)
Score: 0
|Indeed. All this JavaScript lark is all well and good, but they seem to have collectively stuck their heads in the sand when it comes to the inevitable vulnerabilities it's going to entail.
Score: 0
|OK, find something else to milk - the monotonous Firefox 3.5 coverage is now tedious.
Score: -1
|kind of true
Score: 0
|