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

List:       kde-devel
Subject:    Re: Why is KDE so _slow_?
From:       Maks Orlovich <mo002j () mail ! rochester ! edu>
Date:       2002-11-17 6:03:03
[Download RAW message or body]

Look, man, I've spent weeks painfully analyzing things. I don't need any
expert commentary from people who haven't. Is this a bit arrogant? Perhaps,
but mostly tired and cranky. 

> But it is OK to insult a professional programmer by misunderstanding what
>   he said -- deliberately misunderstanding what he said.

I didn't misunderstand what you said. You misunderstood what I said :-).

> Do you actually think that I am complaining about the time needed to
> print the debug information.  If you think that, then you are dumber
> than you are implying that I am.

I am not; but I am pointing out that:
a) You can't measure anything with the debug output on 
b) I know what Konqueror does on startup, and that it's not something that
can be generally delayed or avoided. 
c) The time spent is generally not proportional to the amount of debug
output, particularly since the KConfig area settings might be sent rather
bizarrely. 


> Then why don't you understand the difference between reporting the stuff
> and doing the stuff?

I do, but I invite you to prevent it from doing the stuff w/o breaking
anything.

>> [jrt@localhost jrt]$ konqueror
>> kio (KTrader): KServiceTypeProfile::offers( Browser/View, )
>> kio (KTrader): Returning 28 offers

It takes about 10ms to initialize KTrader when ::offers is called, could be
faster, but that's mostly KConfig's QMap overhead. 

>> kparts: MainWindow::createGUI, part=(nil)

You want menus and toolbars, don't you?

>> konqueror: KonqMainWindow::openURL : url = 'file:/home/jrt' 

High-level decision to open your home directory

>> url = file:/home/jrt konqueror: trying openView for file:/home/jrt
>> (servicetype inode/directory) konqueror: serviceName=

Notes that it's a directory

>> m_sViewModeForDirectory= konqueror: serviceName=
>> konqueror: KonqViewManager::createView
>> konqueror: Trying to create view for "inode/directory"

Starts looking for the view. From before to here is mostly a few function
calls, IIRC.

>> kio (KTrader): KServiceTypeProfile::offers( inode/directory,Application )
>> kio (KTrader): Returning 2 offers

Checks what to open the fileviews with <2ms, IIRC.

>> kio (KTrader): KServiceTypeProfile::offers(
>> inode/directory,KParts/ReadOnlyPart ) kio (KTrader): Returning 9 offers
>> konqueror: konq_iconview : X-KDE-BrowserView-AllowAsDefault is valid :
>> true konqueror: KonqView::switchView

- That's just more of the same, only dumping all the info, and then
Konqueror starts activating the view

>> konqueror: +KonqKfmIconView
>> kparts: found Plugin :
>> /usr/kde3/share/apps/konqiconview/kpartplugins/dirfilterplugin.rc !
>> kparts: found Plugin :
>> /usr/kde3/share/apps/konqiconview/kpartplugins/kimgalleryplugin.rc !
>> kparts: found Plugin :
>> /usr/kde3/share/apps/konqiconview/kpartplugins/kshellcmdplugin.rc !
>> kparts: found Plugin :
>> /usr/kde3/share/apps/konqiconview/kpartplugins/smbmounterplugin.rc !

- Loading all the tools entries. Feel free to uninstall them to save a bit
of startup time

>> kparts: load plugin DirFilter kparts: load plugin kparts: load plugin
>> kparts: load plugin kio (KTrader): KServiceTypeProfile::offers(
>> ThumbCreator, ) kio (KTrader): Returning 12 offers kio (KDirLister):
>> +KDirLister kio (KDirListerCache): +KDirListerCache
>> kio (KDirWatch): Available methods: Stat, FAM

- Looking for some plugins, initializing directory listing

>> konqueror: KonqMainWindow::insertChildView 0x8205850
>> konqueror: KonqMainWindow::viewCountChanged
>> kparts: 0x80c1670 emitting activePartChanged 0x8206348
>> konqueror: KonqMainWindow::enableAllActions true
>> konqueror: Part is already active!

A bit of bookkeeping, pretty trivial time wise.

>> konqueror: KonqView::openURL url=file:/home/jrt

Tells the icon view what to open, if my memory serves me right.

>> locationBarURL=file:/home/jrt konqueror: KonqView::setLocationBarURL

That's quick - just shows the URL

>> file:/home/jrt this=0x8205850
>> konqueror: DirFilterPlugin: New URL    : file:/home/jrt
>> konqueror: DirFilterPlugin: Current URL:

Notifies the dir filter plugin. 

>> kio (KDirLister): [virtual bool KDirLister::openURL(const KURL&, bool,
>> bool)] file:/home/jrt keep=false reload=false kio (KDirListerCache):
>> [void KDirListerCache::listDir(KDirLister*, const KURL&, bool, bool)]
>> 0x823b930 url=file:/home/jrt keep=false reload=false kio
>> (KDirListerCache): [void KDirListerCache::stop(KDirLister*)] lister:
>> 0x823b930 kio (KDirListerCache): [void
>> KDirListerCache::forgetDirs(KDirLister*)] 0x823b930 kio
>> (KDirListerCache): listDir: Entry not in cache or reloaded:
>> file:/home/jrt konqueror: [void KonqView::setLoading(bool, bool)]
>> loading=true hasPending=false kio (KDirWatch): Added Dir /home/jrt
>> [KDirWatch-1]
>> kio (KDirWatch):  Setup FAM (Req 1) for /home/jrt

Start listing your home directory. 

>> kio (KTrader): KServiceTypeProfile::offers( ThumbCreator, )
>> kio (KTrader): Returning 12 offers

Checks for thumbnail plugins

>> konqueror: KonqKfmIconView::slotRenderingFinished()

Dunno what this is, didn't show up on profiles.

>> libkonq: ## addToHistory: file:/home/jrtTyped URL: file:/home/jrt, Title:

Adds a history entry; this is fast since in the local case other instances
aren't notified through DCOP.

>> konqueror: KonqMainWindow::openView ok=true bOthersFollowed=false
>> returning true libkonq: KBookmarkManager::toolbar begin
>> libkonq: KBookmarkManager::toolbar trying cache

If you don't use the bookmarkbar, hide it; that'll save bookmarks from being
loaded on startup. (KDE3.1 only, not 3.0)

>> konqueror: main() -> no args
>> konqueror: KonqMainWindow::slotPartActivated 0x8206348 konqiconview
>> konqueror: New current view 0x8205850
>> kparts: MainWindow::createGUI, part=0x8206348 KonqKfmIconView

Merge in menu stuff from the part, takes a bit of time, but needed.

>> kparts: ReadOnlyPart::guiActivateEvent -> file:/home/jrt
>> konqueror: KonqMainWindow::setCaption(file:/home/jrt)
>> konqueror: KonqView::setLocationBarURL file:/home/jrt this=0x8205850
OK, this one is a bit redundant

>> konqueror: KonqMainWindow::setLocationBarURL: url = file:/home/jrt

Below you're already up and running.

> Now, are you saying that when I remove the debug code that these things
> will not be done?  I know that if I remove the debug that they will NOT
> be reported and it will run faster, but I presume that they will still
> be done.

No, I am saying that they are done because they have to be done, so I don't
see your point at all. There is also very little relation between the
amount of debug output and the time spent in the code. In fact, only about
2 of the lines of the whole output above account for a signficant portion
of the startup time. Heck, a whole lot of work done is not even in any part
of KDE. 


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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