KIconLoader Optimization Idea

Lubos Lunak l.lunak at suse.cz
Tue Jun 7 11:41:25 CEST 2005


On Tuesday 07 of June 2005 08:11, Simon Hausmann wrote:
> On Monday 06 June 2005 18:15, Alexander Neundorf wrote:
> > On Sunday 05 June 2005 15:45, Luke Alan Sandell wrote:
> > > Hi, my name is Luke Sandell, and I am a student at Appalachian State
> > > University looking for a project to do for Google's Summer of Coding. I
> > > had an idea for optimization but I wanted to run it by this group
> > > before I decide.
> > >
> > > My idea deals with the never-ending saga of application startup times.
> > > From
> >
> > ...
> >
> > > What do you think? If this is not a good idea, feel free to suggest
> > > others.
> >
> > the topic of improving icon loading has been discussed already several
> > times. Using an icon server and sockets or pipes to communicate with it
> > and transfer the icons through them will be slower than just reading the
> > files from disk. Shared memory is probably faster, nevertheless you have
> > to talk to the server so that it can actually load the icon. And you have
> > to make sure that everything stays consistent, that the apps don't crash
> > if the iconserver crashed, race conditions etc.
> > It's not sure that this will improve performance.
> >
> > A lot of time is also spent by just searching the icon.
> >
> > Maybe a binary archive of all/many/most used icons which is autogenerated
> > when icons are installed and which can be mmaped might be another idea
> > (like ksycoca). Disk space is cheap, maybe they could even be cached
> > uncompressed.

 You are aware of the fact that checking ksysoca consistency is one of the 
bottlenecks of KDE startup? There's no silver bullet solution.

>
> Lars had the idea of using Qt4's resource system for that. For the common
> icons compile them into a binary blob using rcc, mmap it and register it at
> the resource system as if it were a regular resource. Then you can
> transparently access the mmap'ed icons using QFile[1], and if constructed
> using the QPixmap constructor that takes a filename (or use load()) you get
> the cache for pixmaps on the x-server for free.

 It doesn't matter where you put the code doing that, it's possible to do it 
with KDE3's KIconLoader too. And there are also many possibilities what and 
how to cache.

 As long as nobody has provided any (good) numbers this whole discussion 
doesn't matter anyway.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/


More information about the Kde-optimize mailing list