“A lot of people has been asking me about some performance comparison for the vector graphics framework we have. Rendering polygons, especially when we’re dealing with stroke, tends to be the most expensive rendering operation performed in vector graphics. I constructed a little test, which tests raw polygon rendering power of Qt and Cairo. For the test I used the latest Qt main branch, and the master branch from Cairo’s Git repository.”
“Testing Polygone Performance in Qt, Cairo”
Is this a bad time for a “lost parrot” joke?
I think it’s similar to adding an ‘e’ to ‘shop’ so it sounds old-timey.
Edited 2006-10-23 14:54
Damn English language. Why don’t you guys update the damn language for once #@$@#$!.
Darn it.
Why don’t you guys update the damn language for once #@$@#$!.
Intro something like:
Thom Holwerda is double plus ungood…
Damn English language. Why don’t you guys update the damn language for once #@$@#$!.
English gets updated all the time, just never in a way that makes any sense.
English gets updated all the time, just never in a way that makes any sense.
Tell me about it. I study the damn thing .
Not sure updating a language is a good thing. Just look over the border and ask your German neighbours about their recent experience with it……
Not sure updating a language is a good thing. Just look over the border and ask your German neighbours about their recent experience with it……
The problem with English spelling is that it’s still stuck in the middle ages– literally. English went through a major vowel shift in speech, but spelling never reflected that change.
Heh… Danish is even worse, not to mention Dutch (Which one is worse is something I’ll leave for other persons to decide… i’m afraid Danish is the worse one).
Heh… Danish is even worse, not to mention Dutch (Which one is worse is something I’ll leave for other persons to decide… i’m afraid Danish is the worse one).
Danish and Dutch have a much higher letter-sound correspondence than English. English is one of the worst languages when it comes to that (due to The Great Vowel Shift). Italian, on the other hand, has almost a 1:1 correspondence.
Well, in theory you’re right about Danish, but it doesn’t fit reality in regard to how it is spoken, perhaps with the exception of the area around Copenhagen.
Anyway, off-topic completely, but Italian is a beautiful language, though I only grasp it a little.
And what about the sheer endless number of words that are pronounced the same but have a different spelling?
Translating pronunciation 1:1 to spelling would definitely kill the last small bit of precision left in the English language. *horrors*
I for one like the spelling – maybe even _because_ it makes little sense if compared with pronunciation but gives you some sort of view back in time.
Oh, and please tell everybody in Bavaria and the former DDR that German is pronounced like it’s spelled.
They either don’t know or they have serious spelling problems
Seriously, I know a guy from Dresden and in the first week I asked him to write something down because I didn’t understand a word, no kiddin’
fixed spelling mistake, lol
Still like the spelling
Edited 2006-10-23 23:45
So, it seems that the commercially-backed and professional solution outperforms the fully open-source-community-developed one by 6-7 times.
I thought commercial software was evil and inferior, and all that jazz?
PWNED!
GTK actually get s a fair bit of commercial backing from Redhat and Sun. Also Qt is open-source[1], and has benefited from a lot of input from its users (particularly the KDE devs).
—–
[1]Qt4, which is what is being tested, is GPL-licensed on Windows, Mac and Unix/X11
Indeed.
And yet QT is still developed by a commercial company, and QT w/ commercial licenses is their bread and butter. GTK is primarily community-driven and developed, with some backing from the more active open-source companies.
QT is dual licenced GPL/Commercial – depending on the usage.
The “propietary” software is evil and inferior. Not the commercial one.
It’s great if it’s free (as in freedom) and also can pay the rent.
O RLY?
OS X is inferior compared to Linux?
So, it seems that the commercially-backed and professional solution outperforms the fully open-source-community-developed one by 6-7 times.
I thought commercial software was evil and inferior, and all that jazz?
First of all we’re only talking about one metric. Secondly cairo is still a fairly new technology. Cleary QT wins this round but when cairo has matured more I’m not so sure the differences will be as dramatic.
There is also the point to be made that the Cairo folks are much more concerned with output quality and API elegance than speed at the moment. IMHO, this article should’ve included at least some quality comparisons of the two rendering engines, particularly using corner or degenerate cases.
There is also the point to be made that the Cairo folks are much more concerned with output quality and API elegance
API elegance? You are joking, aren’t you?
Yes. The Cairo API is quite an elegant procedural API to vector graphics.
The Cairo API is quite an elegant procedural API to vector graphics.
You could have fooled me. Cairo programming isn’t terribly nice unless you have a wrapper around it, Cairo# in Mono or something, and Qt has a particularly nice and consistent object oriented framework for everything. I’m not too sure what you’re trying to say. Cairo is neither fast, nor does it have an elegant API.
I also don’t get why people are talking about Cairo getting optimised as a future event, or implying that Cairo is some sort of standard to be followed. A piece of software the size of Cairo should be optimised at key milestones along the way, along with keeping in mind API elegance and quality, whatever quality may happen to mean. It gets much, much harder as time goes on to optimise, as optimisation can call into question the whole structure of the software in the first place.
> particularly using corner or degenerate cases.
the examples were, in some sense, degenerate and cairo did actually crash on some of the cases though likely due to something lower in the stack.
however, you’re right that the purpose of this article was not primarily to compare output correctness. that said, qt4’s output is pretty damn sexy.
I was hoping that someone would mention this. Carl and the crew have been working mostly on making sure that the output is correct, that the API is clean, and that the major backends are implemented properly. Speed is only now becoming more of a focus.
And one the reasons that Cairo is the default renderer for Firefox is that the people of Cairo and freedesktop.org have very good relations with the Mozilla community. In fact, some people are members of both. Another is that Carl generously added the Mozilla Public License (MPL) to Cairo.
Edited 2006-10-23 20:24
I think the technology in QT is just as new, isn’t it? It is just one benchmark, though, and it would be nice to see how they compare with other loads. For instance, how do they compare when used how Firefox 3 would use them on a typical webpage?
So, it seems that the commercially-backed and professional solution outperforms the fully open-source-community-developed one by 6-7 times.
I thought commercial software was evil and inferior, and all that jazz?
And here I thought Qt was an open-source toolkit
Ah, but I notice you cleverly navigated around this little detail: Qt is “commercially-backed”, as opposed to Cairo, which is only backed by … uh, RedHat, for example. Oh, and Cairo is “community-developed”. Surely community input must have had a negative impact on rendering performance. And, of course, Qt is a “professional solution”! Isn’t that good to know.
But anyway, Cairo is still a young library, and until recently hadn’t concentrated on performance work at all. Not that the benchmark is unfair or anything, but it would be idiotic to think the Cairo developers are at their wit’s end with the current state of affairs.
Qt is “commercially-backed”, as opposed to Cairo, which is only backed by … uh, RedHat
Gecko 1.9 will also utilize Cairo as its rendering backend for all 3 platforms. I am sure Mozilla is interested in getting Cairo’s performance up to par with previous versions of Gecko.
last time i checked the free-software foundation’s website, the GPL was more free than the LGPL (which, after all, stands for Lesser GPL).
so Qt is more free than Cairo, at least according to their (pretty high) standards.
and as others have said, gtk gets a lot commercial development as well, and gnome even more (something like gnome 70% paid/30%spare time, and KDE the reverse).
last time i checked the free-software foundation’s website, the GPL was more free than the LGPL (which, after all, stands for Lesser GPL).
You people are funny.
well, there has been a lot of discussion about what is freedom with software. on one hand, the BSD is free: you can do whatever you want. but on the other hand, the GPL is free: you can do whatever you want, but you can’t limit what others can do. LGPL is a bit inbetween. you can’t limit the code itself, but use it to write non-free software, without any contribution to the community.
the free software foundation advises not to use the LGPL, and on the other hand gives the the ‘use GPL for a library’ as an example of a good business model.
LGPL is a bit inbetween. you can’t limit the code itself, but use it to write non-free software, without any contribution to the community.
Not entirely true, every change you made to the LGPL libraries must be open source, so, there is your contribution to the community, to me LGPL is more free and fair than GPL.
well, that’s what i said. you can’t limit the code itself (eg you can do with it what you want but can’t limit others to do the same) but you can use it (the library, in your app) to write proprietary software.
so you can profit from the code, but not give back. the GPL does not allow this, you either have to GPL/LGPL/BSD your app or pay trolltech. in both cases, the community receives something back: your code, OR the code Trolltech writes with your money.
and we see the benefit in this example: Qt is a extremely good toolkit, AND free software! companies like Adobe and Skype are paying for the development of GPL software 😉
Exactly, there is a forced tax for using GPL libraries, and I can’t call freedom to that, sorry.
well, you’d probably rather have everyone use the BSD license. or none at all. i’d rather have a world with as much Free Software as possible, so i prefer the GPL, V3 if i can have it, for as much software as possible. ESPECIALLY lower level libraries, as those force companies to abandon non-free software (or pay to write proprietary stuff, which is a good thing as well). and when the time comes, and Free Software is ‘ruling the world’, Qt will be forked, Trolltech will go away, and nobody will be able to use Qt to write non-free software.
until then, every company who wants to write cross-platform software in an efficient way helps to advance Free Software.
isn’t that a good deal?
well, you’d probably rather have everyone use the BSD license.
No, I said LGPL, read again.
isn’t that a good deal?
Only for those who like GPL and its ideals, not for everyone.
> the free software foundation advises not to use the LGPL
Not true. The FSF still recommends the LGPL for libraries for which there is proprietary “competition” (for example GUI toolkits). I’m assuming you’re referring to RMS’s 1999 paper:
http://www.gnu.org/licenses/why-not-lgpl.html
Ontopic:
W00t! This is excellent news for Qt and free software in general. It would be interesting to see what effect this performance boost would have on a real-world application; how much faster would page rendering in Konqueror be, for instance?
what’s inferior is confusing the “commercial / non-commercial” dichotomy (such as it exists) with the “free / non-free” one. the two sets of concepts are orthogonal.
Really. With the double-digit memory consumption improvements in QT4 and this graphic optimization KDE 4 is going to rock WRT speed an resource usage.
Personally, I find the usability of KDE applications to be a bigger problem compared to resource consumption.
KDE is really elegant in terms of its software architecture, why can’t it adopt an elegant user interface (complex but not complicated?)
Edited 2006-10-23 17:29
That’s the goal for KDE4, lets waith and see.
I hope it works out. Qt really seems nice, and all the stuff it has is great. ( although I probably wouldn’t like to use it until we had Java UI on Qt, Firefox with Qt UI and OpenOffice… I just like my system to feel all the same, not that it is Qts fault. )
But I just can’t stand to use KDE… Gee.
I know there is a taste for everything and I know a lot of people who adore KDE’s UI. I just plain hate it!
Perhaps someday we’ll have something XfKde (as in the old name of Xfce, Cholesterol Free KDE). A simple interface, with some sort of CDE resemblance, fast and elegant, that does not get in your way.
Oh… and applications without tons of megs of gigs of buttons and docks and everything in the same screen. It just makes me sick only to look at a KDE window.
Hmmm I know I am being a bit unfair here. It is just an opinion… and I probably spoke too much already.
To each one, their preferred desktop.
no , you are not being unfair.
and i also share your taste !! that is why i use kde
really , default kde is really “full” , but you can make it really minimalist. ( actually , compared to my kde, xfce is completly bloated ! )
if you want , i have screenshots to prove it !
with some sort of CDE resemblance
A someone who until recently had to work in CDE everyday, I can safely say the last thing in the world I want is a KDE more like CDE. CDE’s looks are best used to scare small children and keep evil spirits out of your cubicle.
I don’t get it, why do a comparison?
I mean, everybody knows cairo gets ass kicked at the moment by literally everything. Cairo is still in heavy development.
They should redo the comparison when the developers finally start optimizing cairo and using the glitz backenD.
Edited 2006-10-23 16:40
> Cairo is still in heavy development.
of course; then again, so is Qt4’s painting infrastructure. the two efforts aren’t all that different in age AFAIK, and both are still seeing serious work.
The difference is that the recent work in QT was optimization work. Meanwhile, Cairo has been concentrating on good output, a variety of workable backends, and simply being correct. Carl Worth (the author of Cairo and it’s tesselator) has been saying that the Cairo tesselator is slow. It’s not a secret that Cairo is in serious need of optimization, it’s just been low on the priority list until now.
The difference is that the recent work in QT was optimization work. Meanwhile, Cairo has been concentrating on good output, a variety of workable backends, and simply being correct.
The thing is, Qt’s vector graphics part has had optimisation work done on it at key points, has a good API as with most things in Qt and produces pretty correct output from all the examples and code I’ve seen. I don’t get the comparison.
It’s not a secret that Cairo is in serious need of optimization, it’s just been low on the priority list until now.
In any kind of graphical framework it needs to be higher up the priority list. The longer it is left the harder it gets.
“I don’t get it, why do a comparison? ”
Because is the toolkit that GTK and hence the whole gnome desktop uses? Because the “GTK is slow” guys may be proven right? Because firefox will use it?
QT 4.x and its “arthur” painting engine isn’t also very new, and it performs well…
Edited 2006-10-23 18:11
Not because A is better than B means that everybody will use A, the main disadvantage of arthur is that is not toolkit indepent like Cairo is.
This test clearly shows that the current CVS version of Qt4 is much faster than the current CVS version of Cairo when it comes to drawing polygons.
So Cairo — and, by extension, GTK — are just rubbish then, right?
Well no, not really. As the author points out, the reason for the high speed is the “wicked new tesselator” included in Qt4.3. He also points out that a new tesselator is currently being written for Cairo, which should give the same polygon performance as Qt.
It would be interesting to revisit this test once the new tessellator is finished and incorporated into Cairo, but I suspect that’s not going to happen…
“It would be interesting to revisit this test once the new tessellator is finished and incorporated into Cairo, but I suspect that’s not going to happen…”
It is going to happen. From TFA: “Once Carl will get the precision down and integrate the new tessellator I’m going to run the tests again.”
Slang words like Homie G, Dawg, Bro, Wazubby, Wigger, etc. have all been fabricated in American culture as acceptable language to use among peers.
If you move to Britian, you’ll need to learn a new English derivative.
You can learn much more about the American-English language at UrbanDictionary.com
I can safely say that I know of no one that uses any of the above outside of satire.
I’m guessing you haven’t spent too much time in “urban” American settings.
Edited 2006-10-23 20:38
Of course I have: I’m in one right now. I simply have not associated with anyone that speaks, well, like an uneducated person. Although perhaps I should take “urban” to mean the specific settings in the cities where one would expect to find people that say the word “dawg” or “bro” outside of satire. Almost any university worth attending is in the middle of “urban” America, though. The colloquialisms I am more likely to hear within the circles that I tred would originate from poor “science fiction” television and cartoons. Outside of television and jokes mocking the “urban culture,” I can’t say I’ve ever heard someone say “dawg,” though. I certainly don’t have to consult Urban Dictionary when conducting my affairs. Now understanding British and Australian people on the Internet can be a real challenge depending on how informal their writing is.
I may of course not be representative of the typical “urban” American. I really could not say.
Try spending some time in Atlanta. I’ve sat five feet from people on a bus, been able to hear them perfectly, yet not understand a tenth of what they were saying.
The local black mode of speech here is very distinctive, compared to what I’ve heard anywhere else in the US. It’s very difficult to understand, due to a combination of unusual vocabulary, unconventional grammar, and a unique pronunciation and word pacing. Of course, I use “unusual”, “unconventional”, and “unique” as relative terms, in comparison to my own “standard southeastern” speech.
The characterization of such speech as “uneducated” is not really accurate. Yes, some people do speak that way because they are uneducated. However, I’ve heard black graduate students speaking that way with their friends. The phenomenon is largely cultural, a mode of speech that arises from a common culture. My family is Bengali, and when I’m speaking to my mother, I often fall into a pidgin of English and Bengali. I’m sure anybody listening in on such a conversation would mistake me for someone fresh off the boat, but that’d be an inaccurate characterization.
Edited 2006-10-24 01:00
“””Try spending some time in Atlanta. I’ve sat five feet from people on a bus, been able to hear them perfectly, yet not understand a tenth of what they were saying.”””
+1 for a very interesting, if somewhat off-topic post! 😉
Edited 2006-10-24 01:38
omg, its absolutely terrible.
It gets hard to understand these people. And we are supposed to be speaking ‘the same language’.
I like what I see.
Quote: “The reason for Cairo with Glitz backend yielding the same results as Cairo with XRender backend is that polygon rendering in both of those goes through the same client-side steps all the way until the final blit and it’s not the blit but the tessellation and rasterization that are the bottlenecks…”
So it seems to me that the API is not *that* polished
if operations cannot be pushed to hardware…
Those of you saying cairo is to new and not polished, how comes that it is already used by gnome/firefox, while Qt version is still under development?
And for the quality concerns see the article cairo *fails* the last test (which is granted a rather abstract example).
Let me say credit where credit is due! Good work trolls:)
Those of you saying cairo is to new and not polished, how comes that it is already used by gnome/firefox, while Qt version is still under development?
Uhm… obviously Qt is already in use as well, in the popular KDE desktop environment. They already have a 2D vector graphics engine in place, but this engine is undergoing further development for the upcoming Qt 4.
The point is, Qt displays these amazing results because it’s coming out of a performance optimisation phase that Cairo is only just entering at the moment. Well, perhaps it’s not exactly comparable. But Cairo has seen very little dedicated performance tuning so far, but this is changing.
Those of you saying cairo is to new and not polished, how comes that it is already used by gnome/firefox, while Qt version is still under development?
Arthur, the new 2D engine for Qt (comparable to Cairo), was first released more than a year ago with the initial release of Qt 4. Cairo 1 was released a few months later.
Also, at this point, Firefox only uses Cairo for its SVG support, which is rarely used due to the scant amount of SVG content on the Internet.
I wonder how AGG would compare here ….
-pekr-
Ok, now we know that the tasselization task is slower than the stencil-buffer based tecniques, to draw a polygon… For my part it’s a pretty obvious thing.
In the real world i see a lot of vector graphic applications that makes a huge usage of svg icons, gis maps, fonts and a lot of gfx (also animated throught the classic 2d transformation matrixes) that don’t need to be re-tesselated every frame; in this common practical case, the stencil-buffer brute force approach is worst than the triangles caching approach.
Another last thing, the Stencil buffer is a luxus on some Opengl(ES) mobiles chips… i know, Qt targets only desktops, but Qtopia?
Sorry for my bad english,
[AD]Ska – http://www.amanithvg.com
Gtk, the GNOME desktop environment in general seems quite slow compared to the likes of KDE and Windows. Heck even resizing a column in GNOME is a joke compared to the others. All that said, i much prefer the GNOME DE as far as usability AND looks. IMHO KDE is atrociously cluttered (I know this is subjective!!).
It seems the last few releases of GNOME have seen a concerted effort to improve performance, and with the backing GNOME is receiving from the community and many corporates, i am sure the situation will see much improvement.
Let me just save you some time here by spelling it all out. As of right now Arthur crushes Cairo in performance, because Zach has been performance tunning the code like a beast.
The Cairo developers are aware of the performance gaps and they’re working on it. When the official releases are completed, the difference in performance will decline, but don’t expect the numbers to change for a while. The qt 4.3 branch is shaping up to be very impressive, because as you can see from Zachs blog, he’s focussing on filling as many gaps as possible in QT’s graphic classes. The svg code and test cases he’s published show the true power of his work, and if your a developer and you like eye candy he’s given you the power to very easily apear to be a graphical genious.