Tuesday, May 08, 2012

The Overhead of KDE Software

When Calligra 2.4 was released there was a flurry of interest resulting in a number of articles in the press and blog posts. Some of these were regular reviews of higher and lower quality. One of them, which I think was one of the better ones, was this one by Påvel (in Swedish). In the review he says that Calligra has a good foundation, he likes it but there are obvious problems with it. I find that an honest and true assessment, especially since it is obvious that he has really tried it and been bitten by some bugs. (Some of these bugs are already fixed in 2.4.2, most of the rest will be gone in 2.5.)

But that is not the topic of this blog post. In one paragraph he says that "since it is a KDE program it will work best in that environment." and offhandedly states that "In Gnome it will drag in a couple of hundred MB as KDE dependencies". I found that unlikely, given all the work that we in KO GmbH have done on Calligra for embedded platforms but I know that there is some overhead involved. But how much is it?

So I asked in #kde-devel on irc if anybody had done the measurements to say how big the overhead of KDE applications is in a non-kde environment. It appeared that nobody had done that, or at least nobody knew about any figures.  But I managed to trigger the curiosity of Michael Pyne enough so that he immediately decided to check it.

He started up his trusty Fluxbox environment and did a continuous measurement of the free memory (taking into account buffers and cache) and found out the following:

When a KDE application is started in a non-KDE environment the memory goes up (of course) and when it is killed again the memory goes down. The memory that remains used is probably the KDE overhead in the form of libraries (Qt and the kdelibs) and daemons (kdeinit4 and kded4). This overhead is 48 MB.

Michael also said that he found that it took "102084 1KiB blocks of memory to run konqueror, konversation, + associated KDE daemon procs in fluxbox." That figure includes everything: the Qt runtime, kde libraries and the applications themselves and is a very low figure for what you get.

As a side note, you will get the same overhead when you run e.g. Libreoffice on your desktop since they have their own toolkit. The difference is that that toolkit is not used anywhere else in any other application.

So, there you have it. Admittedly this is very unscientific but 48 MB is significantly below 200 MB, so much that the 200 MB figure can easily be dismissed. And even when you include two applications and all the toolkits and libraries it still hardly goes over 100. So until somebody takes a more scientific approach I will state that the KDE overhead in a totally non-kde environment is 48 MB.

7 Comments:

Blogger Steffen said...

I'm not sure because I don't understand the swedish post - but maybe he meant more the package dependencies that get pulled in when you install calligra in a non-kde environment...

7:29 AM  
Blogger Pascal d'Hermilly said...

I do read swedish, and I think he was referring to the package-dependencies as well.
Sure it can hurt a little when you just want a small gnome tool that it has to install a lot of dependencies, but for an office-suite I don't feel the pain.

7:46 AM  
Blogger Aaron J. Seigo said...

yes, almost certainly talking about package dependencies.

on the one hand this is a silly statement to make as that is ~$0.014 worth of disk space at today's rates. yes, one and a half pennies.

on the other hand, Frameworks 5 will alleviate this issue significantly for may applications as it will allow rather more clearly defined dependency chains.

8:32 AM  
Blogger Martin said...

I would have expected that it is much less. Would be interesting to see the overhead if we consider that the user is already using some Qt software (let's say they use Ubuntu for example).

Could be quite nice to have some real stats to give to people who consider the overhead as a reason against KDE software.

10:55 AM  
Blogger ingwa said...

On second reading (actually more like tenth :) ) i think you all are right, it was probably about package dependencies. But I still think it's an interesting finding. It would be interesting to see a post about the same situation using KDE Frameworks and Qt 5. And it would also be interesting to see what Martin asked for, the figures for an environment that already uses Qt.

1:18 PM  
Blogger renoX said...

> ~$0.014 worth of disk space

Maybe but when you use a laptop with a SSD, 200MB is 0.20€, not so bad but a good reminder that (SSD)'s space is not so cheap.

2:15 AM  
Blogger Jos Poortvliet said...

200MB? Installing KDE Kontact took about 60 MB in total on my GNOME based openSUSE system. Removing Evolution saved about 40 MB so the 'overhead' is about 20 MB. And the more KDE apps you install, the less it is - after 3 or 4 it goes 'negative' compared to 'independent' apps which all bring their own implementations of everything.

4:03 AM  

Post a Comment

<< Home