qooxdoo strong in Taskspeed benchmark
Filed under: Development, Firefox, Internet Explorer, Opera, Performance, Safari, Technical
By Fabian Jakobs @ April 6, 2009 19:12
Together with the release of Dojo 1.3 information was disclosed about Taskspeed, a new JavaScript library benchmark test. Taskspeed is created and maintained by Dojo's project lead Peter Higgins and is based on the well-known Slickspeed benchmark for CSS selector engines. Taskspeed now compares DOM manipulation performance of various JavaScript frameworks. The first published results see Dojo as a clear winner, leaving MooTools, jQuery and Prototype behind. It's interesting to note that the respective framework developers/authors supplied the tests for their own library, so the code should reflect the best practice and coding style for each library.

Taskspeed Firefox 3 results

Taskspeed IE7 results
Of course, we wanted to know how qooxdoo compares in this "framework-neutral" test suite. qooxdoo's own DOM layer is not too old, it was released in August 2008 with qooxdoo 0.8 by splitting out all cross-browser code from the widget system. The last missing pieces were a CSS selector engine and a nice way to work with collections of elements. Both features were added to the qooxdoo 0.8.2 release that shipped only four weeks ago. While we were quite confident, we did not really know what to expect. But after complementing Taskspeed with the qooxdoo tests and looking at the results we were stunned. The results indicate that qooxdoo is on par with the fastest framework (Dojo 1.3) on most browsers except IE. On IE qooxdoo is by far the fastest framework.
Across browsers and frameworks, qooxdoo gained the highest ranks on all versions of IE (i.e. 6, 7 and 8), and made its lowest mark coming out third on Firefox 3.0. This exceptional IE performance also leads to the best overall score. The IE results are a big surprise and we'll try to investigate, what we do different (better) than all the other JavaScript libraries.
As always performance tests should be taken with a grain of salt. It's hard to judge whether all implementations are really equivalent. For example in the jQuery tests John Resig implemented all tests in a pure jQuery way. There are obvious optimizations he consciously omited, but it apparently reflects the genuine jQuery coding style. There is no official qooxdoo way to work with the DOM yet, so we modeled our tests closely after the Dojo and jQuery tests. Please note that the current tests don't run on a vanilla qooxdoo 0.8.2, but on the latest trunk. That's because the tests exposed two bugs in the framework, which had to be fixed. Most importantly however, no code was changed in the qooxdoo repository to make it perform better in the Taskspeed test suite.
Analysis
So why does qooxdoo perform so well compared to other frameworks?
- We build a GUI-toolkit on top: Our requirements for a DOM layer are different than those of pure DOM toolkits like jQuery, Prototype or MooTools. We build a whole GUI toolkit on top of the DOM layer and DOM performance is the weakest link in the chain. If DOM operations are slow, the whole widget stack is slow. For this reason we try to keep our DOM layer as thin as fast as possible. We do just enough to cover all cross-browser issues, but not much more. In qooxdoo 0.8 we use it mostly as an internal API to build our widgets. We had no incentive to add any syntactic sugar or convenience API which could have slowed things down.
- Sizzle: For the GUI toolkit we have no use for a CSS selector engine. For this reason we were probably the last JavaScript framework to add this feature to its feature list. We always intended to adopt an existing engine and John Resig's excellent Sizzle engine was a perfect match. Since Taskspeed requires the use of CSS selectors in a couple of tests, our good performance is in part due to Sizzle's good performance. Since the latest jQuery 1.3.2 has an identical Sizzle implementation but is rather slow in Taskspeed, there's obviously much more than pure selector speed.
- Collection API: This is the final link, which connects Sizzle with qooxdoo's procedural DOM API. The idea behind the Collection API is to convert the result of a Sizzle query into a collection instance, which provides all the chaining goodness of jQuery. The methods offered by the collection API match most of the jQuery API and map directly to our existing DOM layer. One trick used there is to subclass the native JavaScript array. This way we can conveniently access the elements matched using array accessors, and we can leverage native Array methods like
filter,indexOformapif available.
We plan to position qooxdoo's DOM level API as a standalone part of the qooxdoo framework. These results show that we have a good base and encourage us to move forward in this direction.
Please help the Taskspeed team to collect more data by running the tests yourself and submitting the results when asked for in a confirmation box.

Comment by Isaak
To be honest, I’m quite surprised about Qooxdoo scoring this good. But I do like to know the difference in performance between Qooxdoo and competitor ExtJS.
April 7, 2009 12:33
Comment by Fabian Jakobs
This would be interesting for us as well especially since they have just released ExtCore.
April 7, 2009 13:10
Pingback by Ajaxian » Qooxdoo Jumps into Taskspeed FTW (on IE8)
[...] Fabian Jakobs analyzes why they’ve performed so well, speculating that because they built a GUI toolkit they’ve been optimizing DOM operations since the beginning to keep it fast–and because they use Sizzle, their lack of attention to CSS optimizations didn’t kill them. [...]
April 7, 2009 16:19
Comment by Wolfram Kriesing
Congrats, this looks really cool!. This is the great thing about the open web, every day is a good day to learn new stuff, now it’s time to learn form qooxdoo!
Wolfram
April 7, 2009 17:01
Pingback by Qooxdoo Jumps into Taskspeed FTW (on IE8) | Guilda Blog
[...] Fabian Jakobs analyzes why they’ve performed so well, speculating that because they built a GUI toolkit they’ve been optimizing DOM operations since the beginning to keep it fast–and because they use Sizzle, their lack of attention to CSS optimizations didn’t kill them. [...]
April 7, 2009 20:17
Comment by Jochen
That looks really good. It seems that Eclipse RAP has to jump one day to get the benefit of the qx 0.8.2 performance. Are there lessons learned that are also applicable to the 0.7x stream?
April 7, 2009 23:33
Comment by jobs
Is it really this fast?
but i will use mootools anyway
April 8, 2009 05:49
Comment by Fabian Jakobs
It’s difficult to relate these results to 0.7 since we extracted the DOM functionality in 0.8 from the 0.7 widget code. qooxdoo 0.7 should be as efficient as 0.8 in this regard but its hard to prove.
April 8, 2009 09:46
Comment by Isaak
Jobs, why compare Mootools with Qooxdoo? Qooxdoo is a cross-browser GUI framework while Mootools is a JavaScript library framework = two different things.
Fabian, does the team by any chance have any plans for Qooxdoo vs ExtJS benchmarks?
April 8, 2009 13:17
Comment by Fabian Jakobs
Do you want to see ExtJs in Taskspeed or rather a benchmark of the widget system? I see adding ExtJs to Taskspeed as the responsibility of the ExtJs community. I don’t think it would be fair if we write those tests.
Comparing widget performance is even harder than comparing low level DOM performance. A good benchmark should require a similar set of features from a widget toolkit. Further there is the question of what really make a widget toolkit fast. I personally don’t see this kind of benchmark yet.
April 8, 2009 13:27
Comment by Claus Augusti
Looking back to some serious discussions in a long ago past and seeing how things have evolved since then I’d like to send you guys big congrats! I seriously think we should celebrate this success with some decent rounds of table football
April 8, 2009 13:49
Comment by Aze
Congratters!
It looks like it’s time to switch from jQuery to qooxdoo
April 9, 2009 10:27
Pingback by qooxdoo » News » The week in qooxdoo (2009-04-09)
[...] announcement that qooxdoo comes out fastest in the Taskspeed benchmark generated quite some buzz this week. [...]
April 10, 2009 00:02
Comment by Isaak
Taskspeed would be a good start, but of course the “ExtJS way” and as you said, I agree that this should be done by the ExtJS developers so that it’ll be a fair comparison.
As for the widget part, I wouldn’t have any idea of how you’d benchmark those.
April 10, 2009 23:11
Comment by werwolf
Hi, please check you CSS for errors / nonsence. There are problems with Opera while zooming.
This does not seem to be OK:
#frame {
width: 900px;
position: absolute;
left: 50%;
margin-left: -450px;
}
April 13, 2009 14:32
Comment by werwolf
It seems your problem with the layour has been work-arrounded by adding this:
margin-left: -450px.
It is visible when I comment out this line. Your coding is not that clean how you try to pretend.
April 13, 2009 14:48
Comment by werwolf
the fix would be:
in layout.css
#frame, delete these lines:
position: absolute;
left: 50%;
margin-left: -450px;
and paste there these:
margin-left: auto;
margin-right: auto;
then will everything work well. Thank you for cooperation.
April 13, 2009 14:53
Comment by Thomas Herchenröder
@Werwolf: Thanks for your technical hints. I’m not quite sure what they relate to, but I presume you meant the qooxdoo home page, right?! We’ll see to it. Just note that it is not done with qooxdoo, but with a rather off-the-shelf CM system we have tweaked a bit. And this is not covered by our claim for clean code
. In fact, the home page gets little love, particularly since we are awaiting a replacement system.
April 14, 2009 10:27
Comment by Ralf
Sidenote: I would actually love a qooxdoo theme based on the colors and style of the website.
April 21, 2009 11:48