Improved startkde script?
Lubos Lunak
l.lunak at sh.cvut.cz
Wed May 15 23:01:00 BST 2002
On Wednesday 15 May 2002 23:00, Chris Howells wrote:
> On kde-look.org there is an alternative startkde script which is IMHO quite
> impressive. On my P2/300 normally KDE takes about 30 seconds to start. With
> this new script, KDE startup is down to about 19 seconds which I think is
> quite impressive for 4.5 year old harware.
>
> Even when artificially restricting the machine to use 64MB RAM via lilo
> (normally I have 192) there is still an improvement.
>
> The script basically consists of:
>
> #prelaunch these apps...
> kdeinit_wrapper kdesktop 2> /dev/null
> kdeinit_wrapper kicker 2> /dev/null
> kdeinit_wrapper kwin 2> /dev/null &
When kdeinit is not running (and it's not that this point yet),
kdeinit_wrapper is functionally equivalent to 'exec'.
>
> LD_BIND_NOW=true kdeinit +kcminit +knotify 2> /dev/null &
> kwrapper ksmserver --restore 2> /dev/null || \
> xmessage -geometry 500x100 "Couldn't start ksmserver. Check your
> installation."
>
> #shutdown
> kdeinit_shutdown
> dcopserver_shutdown
> artsshell -q terminate
>
> Is there any reason why something like this should not be adopted for KDE
> 3.1? (KSplash might need a bit of hacking although I don't think it should
> be too much work...)
That "prelaunching" of the apps seems to be the only real difference here
(except for removing ksplash). Could you try the original startkde from CVS
and try to compare it unmodified and with those kdeinit_wrapper preloads
(this computer is a bit too fast to say and I don't have a slower one here)?
This changed startkde looks a bit like the 'sleep' tricks there were in
startkde in the KDE1.x times. The startup time decrease is probably because
this way apps are loaded one by one and not several at the same time (the
lines with kdesktop and kicker will continue only after the apps fork() in
KUniqueApp). Second, this may change may help on systems which doesn't have
/tmp/.ICE-unix set to root:root 1777, where ksmserver is idle for 5 seconds,
so with this change, those 5 seconds are used to something else. Also, on
this a bit faster computer, it actually doesn't work, because at least one of
the apps is ready before kded and therefore doesn't work very well. And
finally, I was kinda under the impression that kdeinit is supposed to make
apps start faster, so this should be actually slower.
In case others can confirm that this change helps, the right thing should be
changing the way how apps are started during KDE startup (that's in klauncher
and ksmserver I think). Right now, after quickly checking the sources, it
seems to me that both ksmserver and klauncher during KDE startup simply fire
up all the applications almost in a row, without any delay, which means all
the apps start at the same time (which is maybe wrong?).
--
Lubos Lunak
l.lunak at email.cz ; l.lunak at kde.org
http://dforce.sh.cvut.cz/~seli
More information about the kde-core-devel
mailing list