kdeinit optimization

Michael Matz matz at kde.org
Mon Jul 5 17:45:37 CEST 2004


Hi,

On Mon, 5 Jul 2004, Karl Vogel wrote:

> 1) Pre fork
> 
> If I'm not mistaken, kdeinit will currently fork() and then dlopen 
> the app when a user launches an app.
> 
> I'm wondering if there would be any benefit in pre-forking kdeinit
> and then having it wait on a pipe to get the app name which is then
> dlopen'ed. That way the VMA/fork setup of the process is done before 
> the actual startup of a process.

Would just use a slot in the process table, complicate the start logic, 
but wouldn't really help startup times.  fork() is quite fast compared to 
what else is done during starting a KDE application, really.  And kdeinit 
processes are not started often enough to make the small speedup add up to 
anything noticable (unlike apache for instance, in case it opens a new 
instance for each request)

> 2) Re-exec
> 
> Another thing I'm wondering about... should kdeinit have a way to
> re-exec?!

Hmm, it should be possible already (just run kdeinit again).  Possibly it 
doesn't yet do exactly what you want, though.

> Since a few systems are now using prelink, long running
> KDE apps will have their sharedlibs deleted by prelink, ie. my
> kdeinit shows:
> 
> 024b0000-024cd000 r-xp 00000000 fd:02 112847     /usr/lib/libexpat.so.0.5.0
> 024cd000-024cf000 rw-p 0001d000 fd:02 112847     /usr/lib/libexpat.so.0.5.0
> 02aff000-02bb7000 r-xp 00000000 fd:02 112630
> /usr/lib/libkdeinit_kicker.so.#prelink#.PrqghO (deleted)
> 02bb7000-02bc5000 rw-p 000b7000 fd:02 112630
> /usr/lib/libkdeinit_kicker.so.#prelink#.PrqghO (deleted)
> 0371d000-0375e000 r-xp 00000000 fd:02 112546     /usr/lib/libmng.so.1.0.0
> 0375e000-03760000 rw-p 00041000 fd:02 112546     /usr/lib/libmng.so.1.0.0

Note, though, that this only would help the kdeinit forker, not the 
already running applications.  But I think it would be sensible, yes.


Ciao,
Michael.


More information about the Kde-optimize mailing list