Will Firefox beat IE9 to Direct2D rendering?

By Scott M. Fulton, III | Published November 24, 2009, 12:47 PM

Mozilla Firefox stand-alone top story badgeIt was a principal element of the Day 2 keynote at Microsoft's PDC 2009 conference last week in Los Angeles: an early demonstration of code being worked into Internet Explorer 9 that replaces the browser's outdated reliance upon the (very) old GDI rendering library, with new code utilizing Direct2D -- a library that borrows processing power from the GPU. But with the project only having begun last October, it could still be several months before Microsoft creates still more features to make IE9 worthy of a point-release.

By that time, Mozilla could very well have absorbed Direct2D capability into Firefox, if it accepts the contribution of engineer Bas Schouten. By modifying a recent daily build of the organization's "Minefield" track for Firefox 3.7 Alpha 1 for Windows, Shouten was able to graft Direct2D support onto the browser, which also usually relies on the old GDI library. The results were Web pages that were as instantaneous to the eyes as the demos we saw of Direct2D rendering on IE9 test code last week.

In a personal blog post Sunday, Schouten discussed some of the difficulties he faced in working Direct2D rendering capabilities onto Mozilla's "Cairo" graphics engine -- difficulties peculiar to Firefox that IE9's developers may not be troubled with: "Direct2D has been implemented as a Cairo backend, meaning our work can eventually be used to facilitate Direct2D usage by all Cairo based software. We use Direct3D textures as backing store for all surfaces. This allows us to implement operations not supported by Direct2D using Direct3D, this will prevent software fallbacks being needed, which will require readbacks. Since a readback forces the GPU to transfer memory to the CPU before the CPU can read it, readbacks have significant performance penalties because of GPU-CPU synchronization being required. On Direct3D10+ hardware this should not negatively impact performance, it does mean it is harder to implement effective D2D software fallback. Although in that scenario we could continue using Cairo with GDI as our vector graphics rendering system."

Although the improvements in on-screen rendering are not something our Betanews CRPI JavaScript performance suite would be able to track, those performance hits Schouten mentioned are indeed something we could see. In tests this morning on Windows 7 RTM using last night's private build of Firefox 3.7 Alpha 1, versus Schouten's remodeled build, the Mozilla build posted a CRPI 2.2 score in Windows 7 of 13.88 -- the best score turned in by a Mozilla browser to date -- versus 12.31 for Schouten's version. At least for now, the rendering improvements come at a cost.

But can those improvements more than make up for the implementation cost, which at the moment Betanews estimates to be about 12.8%?

Comparative browser load times for Firefox 3.7 Alpha 1 with and without Direct2D library support, compared to Internet Explorer 8, on Windows 7 RTM.

Betanews tests this morning revealed the answer, quite surprisingly, to be no. Compared to the current daily Firefox 3.7 Alpha 1 build, timing the page loads for 28 major Web sites on Windows 7 RTM, the Schouten build with Direct2D installed only rendered pages about 5.2% faster than the Mozilla build, according to a geometric mean of the differences in render times. The Schouten build only renders 7.3% faster overall than Internet Explorer 8 by that same formula, which is not even close to the speed gains we saw on Microsoft's own in-house tests of Direct2D on IE9 code last week.

Where the Schouten build did see gains was on very content-rich sites such as the Chinese Web portals, such as qq.com and xunlei.com. But that build also crashed for one of those sites -- sina.com.cn -- and it also crashed for plain old, American aol.com, for reasons we couldn't ascertain. (Perhaps it doesn't like the new branding campaign either.) For content-light pages such as Google and Ask.com, the Schouten build was measurably slower than both the Mozilla build and IE8. It's worth noting here that IE8 is very competitive against Firefox in render times for sites with moderate content, and even on a few sites with heavy content (the Chinese portals, for instance). However, when the content load gets great or when content may be composited from multiple sources (as appears to be the case with Blogger.com), IE8 becomes exponentially slower, with some load times exceeding one minute.

Your eyes may tell you the Schouten build renders faster -- as ours did right at first -- but that conclusion may derive from the feeling of speed you see from a page appearing all at one time. The test build may actually be much faster at snappy rendering, but that's not the entire job; in fact, the page loading portions of our CRPI tests indicate that the test build may actually be slower at that part than the Mozilla build.

Integration is the key to making Direct2D work in place of GDI in the browser; and if this early test build is any indication, Microsoft could be further along in this process than Mozilla after all.

Comments

View comments by with a score of at least

Please be aware that the test results noted above are not an accurate reflection of the state of the development situation. In reading over the blog post about the development of the Direct2D rendering in Firefox, the author notes that the builds that he has created do not have PGO enabled, which provides a significant increase in speed for Firefox builds. Therefore, since his build is already faster than a PGO build, when PGO is included with his Direct2D rendering, Firefox would be much much faster than it currently is. This tends to lead me to disregard any testing done by Betanews, because this points to a lack of investigation of the details of the products that they are testing. I would suspect, although I cannot prove, with both PGO and Direct2D enabled on a Firefox build, it would likely be as fast, if not faster than Google Chrome. This article does not reflect a comparable builds comparison.

Score: 0

|

Who cares about how fast a page is rendered in the first place? What I am interested in is how fast the page feels once I can see it. That includes scrolling speed! I saw a big improvement when testing the 3.7 alpha thing. My mouse has one of these fancy mouse wheels that can be set to keep spinning for about 15 seconds. Do that on a big complex page and compare. 3.6beta4 stutters heavily, 3.7alpha is completely smooth.
Thats the difference I expected from it and it fulfills it completely.

Score: 0

|

About 1/3 into the article I realised I could no longer understand it. I'm not a Firefox coder so I have no idea what the bloke's talking about. It's no good just copying word for word what the guy said. You should be interprating it for me and other readers. It's obvious that either the author of this story is a half-arsed amateur journalist, or the website no longer cares about ordinary people like me. I'm just an average Joe as you Americans would say and I hold my hands up - this article means nothing to me, it's just blah blah blah blah blah. I as a reader am rapidly becoming alienated with all the bullcrap articles, so should I stop coming to this website anymore now?

Score: 2

|

i check who wrote the article first. if it's smf3 then i read the first sentence of the first five paragraphs. sometimes i just skip the article entirely -- even if i'm interested in the headline.

getting to the point expediently and sometimes making a point are things that I see as areas for improvement for him. that's just me though; some people really seem to relish the novels.

Score: 1

|

All browsers should implement an OpenVG rendering backend, sooner o later...

Score: 0

|

Try testing with the acid3 test.
Oh wait, that doesn't work, too much bugs in IE.

Score: 1

|

Try testing with HuffingtonPost.com. You can really see a difference between FireFox and IE. That's what got me to switch to FireFox in the first place.

Score: 0

|

Of course, then you'd have to actually go to the huffington post.....and why would anyone want tot do that? ;)

Score: -2

|

Oddly enough, IE renders HuffingtonPost.com faster for me that Firefox does. However, I am on the latest stable build of firefox.... possibly the latest alpha would render it faster. Just pointing out my findings... I prefer firefox to IE anyday though!

Score: 0

|

Huffington post took about:
1.5 seconds with FF 3.6 B3
4-5 on IE 8 32-bit (extra second to load the ad)
3 seconds with IE8 64-bit (no plug-ins)
on W7.

Score: 1

|

Label the axes of your graph!

Score: 5

|

Or port Glitz to Windows or use another OpenGL backend to deliver hardware acceleration on XP too.

Score: 0

|

Now For once Scott a article that speaks the truth about browser speed. Maybe you didnt want us to actually see that chart. Being you always use some lame java test program to show how IE is 20 times slower then everyone else. But from where i sit your chart shows IE8 neck and neck with Firefox and half the time beating it. Many of those sites i actually goto. It's finally a real world test where you proved IE8 is in fact not so slow but right on target with it's chief rival. The test for blogger.com took less then 2 secs for me. So i have no idea why on your test it took 16 secs. Regardless finally some truth, now we really can let this browser speed issue die. Cause you who have for months claimed IE8 was dog slow, in fact proved otherwise.

Score: 1

|

"now we really can let this browser speed issue die."

Heh...

Never gonna happen. Some people are just way too emotionally involved with their software.

Score: 1

|

My text editor and I are engaged. Is that too involved?

Score: 0

|

Actually, the problem with IE8 is the inability to provide a decent secure environment (activex is terrible), inability to provide half decent addons, inability to provide standards compatibility (not poisoned compatibility). To make the long story short: MS failed to provide a good product, even recognizing that they greatly improved in some of these points (do you remember IE6?).
They still have a chance just because the browser is already installed when you setup windows and most people do not understand the risks associated to IE (lazy).
Most people do not care if site x load in 0.5 or 0.6s, browsers rendering speed does not count (now). Get off from the ancient GDI may count to provide better content, and that is what really matters.

Score: 0

|

"Actually, the problem with IE8 is the inability to provide a decent secure environment"

Google Sandboxing. Been part of IE since IE7.

Score: 0

|

depends, whats the size of the rock it gave you?

Score: 0

|

Hehe...

Ouch.

Score: 0

|

Damn right.

IE has died for me a long time, when I saw how svg was treated.

Hopefully the browser ballot screen will level the playing field for the lazy people :).

I really don't get it why nobody has done OpenGL-acceleration for firefox.
Oh way, they're integrating support for WebGL.
Interesting WebGL vs DirectX.

Score: 0

|

But still, IE8 is VERY slow in opening a new tab. They really have to throw away the "compatibility mode" in IE9 to move things forward.

Score: 1

|

Rendering speed isn't the issue here... the important thing is moving off of the GDI base to something more substantial that can be worked with.

Score: -2

|

Google Buzz: Another attempt to harness the content firehose

Similar to how Google successfully remolded RSS into a Google tool, the company now wants to remold Gmail into one big Google party

Success: Google's Nexus One shipping support line takes tech support questions

UPDATED Though the support line had been set up for shipping, it now appears Google personnel are happy to hear technical concerns.

Goodnight, moon: What I learned from a space shuttle

Carmi Levy | Wide Angle Zoom: Can the tech sector learn a few lessons from the space program? Certainly, if you believe in learning from someone else's mistakes.

Netflix to FCC: NBCU + Comcast could bypass net neutrality

Weaning itself from the post office as its main means of video transfer, Netflix would like someone to ensure the Internet remains just as unencumbered.

Rhapsody to become an independent company

RealNetworks and Viacom subsidiary MTV Networks have begun the process of spinning off music service Rhapsody into an independent company.

Nvidia debuts new dynamically-switched graphics card technology

Today, Nvidia announced that its Optimus technology for GPU switching will soon be available in a handful of Asus notebooks.

Google lowers 'unusually high' early termination fee on Nexus One

Google has lowered the Nexus One's early termination fees which were twice as high as the norm.

Netgear and Ericsson introduce a mobile broadband hotspot with a twist

It's a mobile broadband hotspot, but it's for use in the home.

Report: Streaming video drove 72% global increase in mobile data consumption

A new study says streaming video is "the single most influential factor driving the need for increased mobile network capacity."

Stymied by continuing Nexus One 3G issues, Google blames the environment

If you're still afflicted with the 3G flip-flop trouble, then you might consider moving. That appears to be the only suggestion Google can give for now.

Wolfram|Alpha makes a strong argument for virtual keyboards

"Answer engine" Wolfram|Alpha has updated its iPhone/iPod Touch app, harnessing the strength of the virtual keyboard.