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

Ben Cooksley sourtooth at gmail.com
Sat May 23 10:27:46 BST 2009


On 4/30/09, Christoph Feck <christoph at maxiom.de> wrote:
>> > Am Tuesday 28 April 2009 07:12:09 schrieb Ben Cooksley:
>> >> I am using the "show early, finish loading later" trick. I have fixed
>> >> the issue now.
>
> 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? I mean,
> the application has to be forked somehow, I have no clue how this works
> internally, but for me the difference is HUGE (I am using icon view mode).

Did you load system settings at least once before testing? Due to disk
caching the first run will be much slower than all others ( something
to do with KServiceTypeTrader queries I think ). On my system it can
vary between 6 to 9 seconds, but the following runs ( after closing
System Settings ) usually only take about 0.8 seconds.

I found no significant difference from this second figure when
replacing the call, with one result actually taking longer once.

>
> Anyone experiencing the same difference?
>
> Christoph Feck (kdepepo)
>

Ben Cooksley (bcooksley)




More information about the kde-core-devel mailing list