Friday, March 7th, 2008

IE and WebKit Performance; Is WebKit the Ralph Nader of Browsers?

Category: Browsers, Performance

We have seen a barrage of performance and compliance information this week haven’t we. Wow. We got a little more yesterday too.

The WebKit team talked about the Acid 3 test and how they are up to 90/100:

Support for CSS3 Selectors

We added support for all of the remaining CSS3 selectors. These include selectors like nth-child, nth-of-type, last-child, last-of-type, etc. These selectors were already implemented in KHTML, and the KHTML developers had even kindly provided patches for us in the relevant WebKit bugs. Therefore it was a simple matter of taking those patches, updating them to the WebKit codebase, and then merging them in. A big thanks to the KHTML developers for their hard work in this area.

Parsing Bugs

WebKit had a number of minor parsing bugs that Acid 3 targeted. The boxes did not render properly because of an obscure parsing bug that the test exploited (thanks, Hixie). In addition a number of other parsing bugs kept us from completely passing individual tests. We have updated our parser to be much closer to the HTML5-specified parsing rules.

WebKit has also never parsed DOCTYPEs before. I re-wrote WebKit’s DOCTYPE parsing to match the HTML5 specification, and so now if you put a DOCTYPE into your page it will be present in the DOM. In addition many bugs centered around proper mode resolution (quirks vs. strict) have now been fixed. You can document.write a DOCTYPE for example in a new document and have the correct mode be selected.

SVG

Acid3 has many SVG tests. We’ve been hard at work making these tests pass. In particular SVG font support and other aspects of the SVG DOM have been tested. Many of the remaining 10 points are SVG failures. We’ll be working on SVG animation in order to pass the last few SVG tests.

DOM

Acid3 tests a lot of DOM level 2 features, like traversal and ranges. It particularly focuses on the “liveness” of objects, e.g., making sure everything updates properly when you dynamically change a document by adding/removing nodes. Most of our failures in this area had to do with not behaving properly in the presence of these dynamic changes (even though we tended to pass the more static tests).

The JScript team also blogged about JScript improvements including fixing String concatenation.

Prior to this optimization of string concatenation, most developers used Array join operations to achieve the same result. We were aware of this tradeoff and made sure that the Array operations are also optimized. In either scenario, developers will experience significant performance gains.

I would love to see a benchmark of + vs. join() and hopefully see that join isn’t needed anymore. This feels like some of the moments in Java where the verbose code that you wrote to make things faster started to back fire (e.g. String concat too, and object pooling as creating an object became so cheap).

Ralph Nader of Browsers

This is a very random thought. Watching the WebKit and Firefox teams grinding away makes me wonder if one of them is like the Ralph Nader of browsers. Does WebKit take away share from Firefox? I have seen many developers prefer it recently, and a lot use both (myself for one). Having said that, the bulk of users are probably the folk who buy a Mac and click on the browser icon and don’t really care.

Is having the third candidate in the race a good thing? Does competition between WK and FF itself help both projects and spur them on to greater heights, or would it be even better to have a meeting of the minds and merge the WebKit and Gecko teams, at least in a way where they both aren’t optimizing the JavaScript engine etc. Hmm.

NOTE: There is still a lot of room to innovate in the browser itself, but share the low level engines. Maybe it is most to do with personalities. If the teams could work together that would be one thing (and remember Dave H used to work on Firefox), but it not…. then it is obviously silly. What do you think?

Posted by Dion Almaer at 12:34 pm
14 Comments

+++--
3.4 rating from 39 votes

14 Comments »

Comments feed TrackBack URI

I think there is plenty of room for both — according to stats on wikipedia, usage share of both Mozilla and Safari are increasing: http://en.wikipedia.org/wiki/Usage_share_of_web_browsers

Comment by Will Peavy — March 7, 2008

Wait, WebKit is an election throwing parody of its former self? I don’t understand the analogy. :-)

Comment by Ryan Breen — March 7, 2008

Well if there is an analogy and the question is whether the 3rd candidate should run, the I vote – NO! IE should get out of the race. :-)

Comment by Juergen — March 7, 2008

I think there’s no question that competition in the open source space is a good thing.

Comment by codedread — March 7, 2008

Seeing as they’re both open source, there really isn’t any barrier for them sharing ideas and learning from each others advancements. There’s also a lot of value in having the same problem solved separately under different philosophies. You don’t want to reinvent the wheel, but on the other hand we don’t want open-source software to become a homogeneous collection of “good enough” products. Consumer choice and competition are both Good Things.

Comment by JustinDriscoll — March 7, 2008

Having a third candidate? As far as I’m concerned, the only candidate are the ones who follow standards and who compete on standards compliance. This means the regular member, IE, is barely in the game.

Interestingly enough, how quickly will IE8’s adoption be? If Microsoft can get people to upgrade by touting its standards compliance, why wasn’t standards compliance a significant reason to switch away from IE to a standards compliant browser previously. I hope this all plays out well.

Comment by Andy — March 7, 2008

I don’t see WebKit taking anything away from Firefox. Particularly because I don’t think Firefox “should win”. If ever a web browser could be compared to Nadar I’d say it’s Opera. Opera has been around so long and has a very loyal following. But it’s a small following that will constantly berate Firefox users whenever it’s a Firefox vs. IE meme. They just show up shouting and flailing their arms.

Here’s my Browser Political Platform:
IE 6 = Bush (Everyone, even MS fans can’t wait for it to die)
IE 7 = McCain (Still in the party but at least it’s not IE 6)
Firefox = Clinton (Everyone loved it because it wasn’t IE 6. Now it’s just bloated and runs slow.)
Webkit = Obama (Oh, it’s slick and on all the toys the cool kids use. It’s even pulling in independents like Google. It still has a lot to prove.)
Opera = Nadar (It has all the right answers and people really should embrace it. But there’s just too many crazy zealots supporting it to get it widely adopted.)

Comment by tastypopsicle — March 7, 2008

You know, prefacing stupid things with “this is a random thought, but…” doesn’t excuse their stupidity. WebKit is Ralph Nader? Huh? As if Firefox is more entitled to be the browser of the informed masses?

Comment by Andrew Dupont — March 7, 2008

I’m with tastypopsicle on that one.

Comment by p01 — March 7, 2008

Ya webkit is a 3rd party hack stealing marketshare from two shining examples of what a web browser should be. Ya that’s it. That must be why gecko and ie get passed up everytime a new web oriented technology is born, i.e. Android and Air. Hmmm ya, that’s it. Competition is good. I hope Firefox 3 takes the lead for awhile in the web browser world, but given the tendency toward self satisfaction of that team, I really doubt it’ll happen.

Comment by vance Dubberly — March 7, 2008

Mono-culture is bad mmmkay? We’ve seen plenty of examples of this in our IT life’s history, all in all everything is a lot healthier if there’s some variety, otherwise we should’ve all have stuck to IE6 and forget about other platforms, standards and all that :)

Comment by chabotc — March 9, 2008

Competition is always good – as long as it does not get stuck on insufficient technology support. While good XHTML/CSS support is a must, SVG and XSL/XPATH should not be left behind. Good to see something happening here. I would also like to see more support for Xforms as it would simplify a lot of AJAX form handling….but it does not seem it is going to happend any time soon, if ever… :(

Comment by OndraM — March 10, 2008

+1 @ tastypopsicle

Comment by Carbon43 — March 11, 2008

Are you saying that WebKit is a narcissistic, useless, detracts from real progress, and has perhaps philosophical legitimacy but none in the voting booth of our downloads? That’s as backwards as anything I’ve ever heard on the internet. Webkit is about to be the browser powering every Nokia phone, is already on every iPhone (iPhones alone amount to MORE THAN 50% OF ALL MOBILE SEARCHES ON GOOGLE), every sensible Linux distro, and, oh yeah, the teeny Macintosh market too. And the DOM inspector in Safari is better than Firebug, there I said it. :)

Comment by Geniusjones — March 17, 2008

Leave a comment

You must be logged in to post a comment.