KUniqueApplication/delayed fork trick in KConfig4 (was: Re: trunk)

David Faure faure at kde.org
Wed May 20 13:58:20 BST 2009


On Thursday 30 April 2009, Christoph Feck wrote:
> I was just curious how much effect this delay trick had on perceived 
> performance, and I replaced this call (SettingsBase.cpp, line 54)
> 
>         QTimer::singleShot(0, this, SLOT(initApplication()));
> 
> with a simple
> 
>         initApplication();
> 
> ... and it now starts MUCH faster! Does this have something to do that I run 
> from Konsole? Is KUniqueApplication getting confused by that trick? 

Why would this confuse KUniqueApplication?? On the contrary, not taking too much
time on startup is good, otherwise KUniqueApplication's DBUS call to newInstance
can time out.

In fact: does the change also make a difference when using --nofork? Then
this is unrelated to KUniqueApplication. An idea is to run that in callgrind with
and without the fix to understand why it makes a difference.

-- 
David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list