Some optimization opportunities

Alexander Neundorf neundorf at kde.org
Sat Jun 19 14:51:14 CEST 2004


On Saturday 19 June 2004 14:22, Daniël Mantione wrote:
> On Sat, 19 Jun 2004, Alexander Neundorf wrote:
> > Yes, icons are searched in a lot of directories, I found the same thing
> > when I running KDE on my old K6/200, but it's now almost 2 years ago.
> > On my current system (AMD Athlon XP 2000+) it looks like this
>
> Yes, if your computer is 10 times faster, the system calls get 10 times
> faster too :) Still I'm surprised the system calls have so much overhead,
> I remember a 486 could do about 1500 real/protected mode switches a second,
> if I look at this Linux can do only several 1000s of system calls a second
> on a k6.
>
> > I'm afraid changing the search behaviour might break apps which rely on
> > it.
>
> Well, I guess the app simply searches for "www.png" and the KDE libraries
> try to find the file, so changing it would not necessarily break things.
> But I'm just an outsider...
>
> > But it would be nice if you could spend some time to improve this issue.
>
> Well, I'm not a KDE developer, my "home" open source project is the Free
> Pascal compiler, so I'm more a user than a developer. As how to improve
> it, I can think of several things. Since I'm a big fan of the KISS
> principle, my personal favourite would be that the multiple
> directory support gets kicked out, and only search in well known
> directories. As this could introduce a maintainability issue, applications
> might then slowly be changed to ask for directory/picture.png instead of
> picture.png.
>
> Another possibility is to scan directories first and remember which file
> is in which directory. However, this has the disadvantage that every
> KDE application increases it's memory usage as the user copies more icons
> on his system.

On my system:

hammer:/usr/src/qcpp$ find /opt/kde/share/ -name *.png|wc -l
  16859

So, a lot of files, would make a big index :-/

Something else I wanted to mention:
with the increasing number of translations the size of the .desktop/.theme 
files is growing. Many files consist of about 100 lines, with 90 lines being 
translations, from which only 1 line would be really required.
I didn't measure, but I think this also slows the startup of kde apps. OTOH I 
have no good suggestion how to improve this situation.
Maybe provide a file for each language, which are generated during 
compilation ? e.g. konqueror.desktop.en, konqueror.desktop.fr etc. 
This would need more hard disk space, but would save some startup time (and 
maybe memory consumption of each app ?).

Bye
Alex
-- 
Work: alexander.neundorf at jenoptik.com - http://www.jenoptik-los.de
Home: neundorf at kde.org                - http://www.kde.org
      alex at neundorf.net               - http://www.neundorf.net


More information about the Kde-optimize mailing list