[PATCH] Bugfixes for profiles and preloading.

Lubos Lunak l.lunak at suse.cz
Fri Jan 6 15:53:41 GMT 2006


On Thursday 05 January 2006 18:38, Emanuele Tamponi wrote:
> On Wednesday 04 January 2006 17:21, Lubos Lunak wrote:
> >  Preloading, if my memory serves me well, works like this: When a
> > Konqueror instance is about to quit, or when its last window is about to
> > be closed, it's first checked if there should be an instance kept
> > preloaded for being used again later. If yes, this is prevented and the
> > instance is kept for reusing later. This means there's a prepared
> > instance running, which saves startup costs, and there's often a window
> > prepared as well, which saves the cost of setting it up. There's a kded
> > module which takes care of such preloaded instances and tells exiting
> > instances whether they should really quit or stay around.
>
> Excuse me if the page is not reachable, I'm upgrading my server and still
> have some problems...
> Maybe what you said is fine, but Konqueror preloads its instances without
> checking if their xmlfile is the same. So, if I have a preloaded instance
> of konqueror with "konqueror.rc" xmlfile, it will be loaded also if the
> requested konqueror wants a "konq-simplebrowser.rc" xmlfile. And that's
> just a working example.
>
> Now, maybe the patch isn't correct, but it prevents this from happening. It
> can be used at least as a workaround (I'm using it since I posted it here
> and never got problems). But I thinks kded doesn't check if the xmlfile is
> the same...

 Yes, I understand that, that's a bug. And you try to fix that with the patch, 
ok. What I'm saying is that:

- there's a bug in your patch. The block after the if() in konq_misc.cc that 
your patch changes is the block that reuses a preloaded instance. If you 
decide not to reuse KonqMainWindow::preloadedWindow() because it uses another 
profile you still need to do at least some of that work - delete this old 
window if any, and do both the KonqMainWindow::setPreloaded* calls to do 
cleanup.

- Konqueror preloading is there to improve perceived startup performance by 
reusing saved konqueror process and KonqMainWindow in it if possible. Your 
patch sometimes turns off reusing of the window. It might make sense to check 
how big difference that makes and possibly try to reuse that window and just 
switch the profile for it, or first find a preloaded instance with a matching 
xml or something like that. If you just say e.g. "creating the new 
KonqMainWindow costs XYZ, users usually don't switch profiles that often and 
it's just not worth the effort", ok, fine with me. But the feature was quite 
some work (and benefit) to just turn half of it off in order to fix a bug 
almost nobody has noticed for years, _without_ first checking.

-- 
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 kfm-devel mailing list