[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    RE: Startup time (RE: konqy listview configurability)
From:       David Faure <David.Faure () cramersystems ! com>
Date:       2000-03-20 14:17:30
[Download RAW message or body]

> On Mon, 20 Mär 2000, David Faure wrote:
> > I wanted to add that : konqueror doesn't use kdeinit if
> > you start it manually (it's one or the other !) but it should
> > do if you use kfmclient (for instance if you click on
> > an icon on the desktop or use the icon in kicker). But this needs
> > to be checked - the code is there but I don't think I saw
> > it working finally. :)
> 
> Ahhh, that's why I didn't feel a difference ;-)
> 
> I could measure the time required by the single steps in its 
> constructor/main on my K6 200, are you interested ?

Yes, definitely.

> > Note that using KProtocolManager::listing()
> > and reading a few values from config files (which is needed 
> > in both cases) does not slow down anything at all 
> 
> "Kleinvieh macht auch Mist" in german, roughly in english 
> "small domestic animals create dung too" (ouch)
> What I want to say, big apps/libs bigger on the disk and 
> requiring more reallocations slowdown startup. A single addition doesn't 
> significantly slow down the whole. Tons of small additions do.

I know that. But that's no reason for ruling out the feature
"making the columns configurable". If we wanted to optimize for speed
only, we would re-develop "ls", not "konqueror" ;-))

> I think I read somewhere that
> 
> class A
> {
>    protected:
>       int i;
> }
> 
> A::A()
> :i(1234)
> {};
> 
> is slightly faster than 
> 
> A::A()
> {
>   i=1234;
> };
> 
> since the seconds extends to 
> 
> A::A()
> :i(some undefined value)
> {
>    i=1234;
> };

This depends on the class. With an int, it doesn't slow down
anything, since NO initialisation happens. "undefined value" is
whatever is at the bit of memory at that moment, there is no
code associated with it. But with stuff like QStrings and other
real classes, yes, you can avoid one method call by calling the
appropriate constructors. I doubt this is the major reason
for any slowness though. But time will tell ;)

> Of course this doesn't effect anything if you change it in one class, but
there
> are probably hundreds of objects which are initialized if kde starts.
> I don't know if the compiler optimizes this or if it would 
> help anything, but at least IMHO it is nicer and more C++-like code. 
> You see explicitely which members are new introduced in this class.

I agree, but this code is also annoying to maintain because
it requires that the order of the constructors matches the
order of declaration in the header. So if you move stuff around
you're lost ;-)))

David.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic