Let's break this silence

Alexander Neundorf neundorf at kde.org
Sun Aug 22 21:54:20 CEST 2010


Hi,

On Saturday 21 August 2010, Mohammad Ebrahim Mohammadi Panah wrote:
> Hi everybody (if any!),
>
> Who am I?
> I'm a long time KDE user, who also has some minor contributions to KDE
> here and there. I'm also a software developer, specially high
> performance software, usually using C++.
>
> (Let me say it first: I'm really sorry if my words bother you. I'll be
> narrating some sad dramas.)
>
> Why am I here?
> I'm dissatisfied with KDE performance, CPU-wise, memory-wise, etc.
> This is one of my stories: one day me and my KDE-using friend were
> talking about everything, and then he said KDE is bloatware. First I
> tried to tell him KDE is not that bad. But after I checked memory
> usage on my own system, I found out unfortunately he's right. A
> regular KDE 4.4 desktop alone was using around 500 megs of RAM. My
> friend runs many (bloated) apps, so he needs all bytes of his RAM!
> After a few days I met him again. He had switched to Gnome. He told me
> he's much happier now with his faster and less bloated desktop,
> although he still ran some KDE apps on his Gnome desktop. :(
> It seems there is a problem with KDE which should be fixed. I searched
> around the internet for KDE optimization content. But almost all the
> info was years old, and for the KDE3 age. The most promising reference
> I found was this mailing list. I took a look at archive and... aaah, I
> should have guessed.
>
> Now what?
> I think there is room to make KDE faster and less memory hungry,
> although I haven't dug deep into the issue. I thought I should discuss
> the issue with you, the more experienced KDE developers/optimizers, to
> see what's your idea. Is there any plan/roadmap/strategy for
> optimizing KDE?

No, there isn't. Everybody who is interested in optimizing just does it.
I guess it's a good sign that you posted here because this means finally KDE 
4.x runs good enough so that now the optimization part is becoming more 
important :-)

> Any guides or guidelines?  

Start with finding out where the problems are, i.e. find out where the memory 
is used. 
There are several good blogs from Lubos Lunak on this topic:
http://www.kdedevelopers.org/blog/280

Regarding speed, not memory, well, just try to find the bottlenecks, using 
profiles (valgrind with cachegrind), etc.

> Have you documented your KDE
> optimization experience anywhere? What's your ideas about how we can
> optimize KDE?
>
> A crude idea to make things more spicy: What's your idea about
> removing some dynamic memory allocations by using stack in place of
> heap?

Well, if the memory allocations are done in tight loops then they should 
indeed be avoided.
But a lot of the allocations can't be avoided: basically all the container 
classes from STl and Qt use dynamic allocations, also std::string and 
QString.
Also all QObjects should be allocated on the heap, since they are delete'd 
automatically by their parents.

Alex


More information about the Kde-optimize mailing list