Bug 62097 - Khelpcenter extraordinarily slow to load
Summary: Khelpcenter extraordinarily slow to load
Status: RESOLVED FIXED
Alias: None
Product: khelpcenter
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Cornelius Schumacher
URL:
Keywords:
: 76568 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-08-04 05:11 UTC by Richard Sperling
Modified: 2004-03-05 03:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to speed up building of the alphabetical info tree (for 3.2.0) (703 bytes, patch)
2004-02-11 15:47 UTC, Bart Vanhauwaert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Sperling 2003-08-04 05:11:38 UTC
Version:            (using KDE KDE 3.1.3)
Installed from:    SuSE RPMs
Compiler:          gcc 3.2 
OS:          Linux

Khelpcenter takes forever (30+ seconds) to load under KDE 3.1.3. This behavior was not present in version 3.1.2. I would love to go back to version 3.1.2, but I can't find the rpms. I've also noticed strange display behavior with some games, e.g., KMines and KPoker. There are definitely some problems with version 3.1.3.
Comment 1 Thiago Macieira 2003-08-04 13:36:53 UTC
Can you give us any clue on why it's slow or in which function it's hanging? 
 
There haven't been any major changes in khelpcenter's code to warrant those problems. 
 
By the way, 30+ seconds delays are generally associated with misconfigured DNS settings. 
Comment 2 Lauri Watts 2003-08-07 14:04:13 UTC
Possibly Khelpcenter is recreating the documents because the copy installed is 
newer than (or appears newer than) the cached copy installed.  If so, this is 
most likely a packaging problem. 
 
If this is the case, you'll see a lot of 'parsing stylesheet' and 'applying stylesheet' 
messages taking quite some time, in the lower left of the status bar.   
 
You can test by finding the installed documentation ($KDEDIR/share/doc/HTML/
en/<any-app-name>/) and comparing timestamps on the files 'index.docbook' 
vs 'index.cache.bz2'  The cache file should have the newer timestamp. 
Comment 3 richard 2003-12-30 00:33:42 UTC
I'm having a similar problem with 3.2 beta 2 (in beta 1 it loaded fast but crashed before I could use it); running it from the command line shows that it spends most of the time parsing info directories (it does this every time it's started).
Comment 4 Bart Vanhauwaert 2004-02-11 15:46:16 UTC
I have confirmed the problem. It's probably due to rebuilding the info tree sorted by alphabet. Try the attached patch. It brings down startup time for khelpcenter from >20sec to 1.5sec for my computer. (Patch is for 3.2)
Comment 5 Bart Vanhauwaert 2004-02-11 15:47:15 UTC
Created attachment 4638 [details]
Patch to speed up building of the alphabetical info tree (for 3.2.0)
Comment 6 Daniel Naber 2004-02-17 00:49:30 UTC
This was fixed recently.
Comment 7 Bart Vanhauwaert 2004-02-18 22:30:03 UTC
CVS commit by bvh: 

Reduce khelpcenter startup times for systems with lots of info files.
(Fix already in mainline)

CCMAIL: 62097@bugs.kde.org


  M +3 -3      infotree.cpp   1.14.2.1


--- kdebase/khelpcenter/infotree.cpp  #1.14:1.14.2.1
@@ -163,7 +163,7 @@ void InfoTree::parseInfoDirFile( const Q
 
         InfoCategoryItem *alphabSection = 0;
-        for ( QListViewItemIterator it( m_alphabItem ); it.current(); it++ ) {
-          if ( it.current()->text( 0 ) == appName[ 0 ].upper() ) {
-            alphabSection = static_cast<InfoCategoryItem *>( it.current() );
+        for ( QListViewItem* it=m_alphabItem->firstChild(); it; it=it->nextSibling() ) {
+          if ( it->text( 0 ) == appName[ 0 ].upper() ) {
+            alphabSection = static_cast<InfoCategoryItem *>( it );
             break;
           }


Comment 8 Dylan Carlson 2004-02-28 11:36:25 UTC
I'm using KDE 3.2 and khelpcenter still takes forever to show up.  And I've got 2GB of RAM on a dual Opteron workstation!  Even closing and reopening it makes no difference.  

The slowness isn't after the window appears -- most of the slowness is just getting the window to appear.

When everything else (generally speaking) runs almost instantaneously, and khelpcenter takes forever to just show up on the desktop... I have very little incentive to read any of the documentation...
Comment 9 Cornelius Schumacher 2004-02-28 12:10:58 UTC
There are various different potential causes for slow startup of KHelpcenter. Without giving some hint what could be the cause (e.g. based on debug output) we can't do very much as it varies from system to system what is the slowest part of startup.
Comment 10 Maksim Orlovich 2004-03-05 03:43:29 UTC
*** Bug 76568 has been marked as a duplicate of this bug. ***
Comment 11 Maksim Orlovich 2004-03-05 03:44:02 UTC
Re: Comment #8: This change is not in 3.2.0, it should be in 3.2.1, though, looking at the tag