Bug 244503 - selecting a folder is slow
Summary: selecting a folder is slow
Status: RESOLVED FIXED
Alias: None
Product: kdepim
Classification: Applications
Component: messagelist (show other bugs)
Version: unspecified
Platform: Debian unstable Linux
: HI normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: akonadi-ports-regression
: 243829 (view as bug list)
Depends on:
Blocks: 223438
  Show dependency treegraph
 
Reported: 2010-07-13 15:48 UTC by Ludwig Reiter
Modified: 2010-07-22 12:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ludwig Reiter 2010-07-13 15:48:54 UTC
Version:           unspecified (using Devel) 
OS:                Linux

Selecting a folder with 1000 mails needs about 10 sec to display.
For working it should be less than 1 sec.

Reproducible: Always

Steps to Reproduce:
1. Create a folder with 1000 test mails.
2. Switch to a different folder.
3. Click on the test mail folder.

Actual Results:  
The mails are displayed slowly. (~10sec)

Expected Results:  
The mails should be displayed in less than 1 sec.
Comment 1 Thomas McGuire 2010-07-13 23:18:15 UTC
This is a big problem, and likely to be a blocker for David and me.
Comment 2 Volker Krause 2010-07-14 16:14:59 UTC
Thomas, could you please try with the following patch and let me know how much faster it is for you then. It disabled Nepomuk access in the message list, which gives me a 3x speedup without having Nepomuk running at all, so likely more if there has been a working Nepomuk before. This is of course not the solution to this problem, but would indicate that I'm looking in the right direction to fix this, since I cannot confirm the numbers posted here on my system, loading 10k messages takes only ~2.5sec here.

Index: core/messageitem.cpp
===================================================================
--- core/messageitem.cpp        (revision 1149821)
+++ core/messageitem.cpp        (working copy)
@@ -232,6 +232,7 @@
   // TODO: The tag pointers here could be shared between all items, there really is no point in
   //       creating them for each item that has tags

+#if 0
   const Nepomuk::Resource resource( mNepomukResourceUri );
   const QList< Nepomuk::Tag > nepomukTagList = resource.tags();
   if ( !nepomukTagList.isEmpty() ) {
@@ -267,6 +268,7 @@
       mTagList->append( messageListTag );
     }
   }
+#endif
 }

 QList<MessageItem::Tag*> MessageItem::Private::getTagList() const
@@ -300,12 +302,14 @@
   if ( d->mAnnotationStateChecked )
     return d->mHasAnnotation;

+#if 0
   Nepomuk::Resource resource( d->mNepomukResourceUri );
   if ( resource.hasProperty( QUrl( Nepomuk::Resource::descriptionUri() ) ) ) {
     d->mHasAnnotation = !resource.description().isEmpty();
   } else {
     d->mHasAnnotation = false;
   }
+#endif

   d->mAnnotationStateChecked = true;
   return d->mHasAnnotation;
Comment 3 Till Adam 2010-07-14 22:28:22 UTC
SVN commit 1150006 by tilladam:

Avoid initializing the tags list from nepomuk for sizehint calculation.

Since the font for each message can be overridden by a tag, and since
the font size needs to be known at row height calculation time, the
tags list ended up being populated for each item, during message list
creation, which, since it's a nepomuk roundtrip or two, was very slow.
This change makes the font only take the tag into account when the tags
list is already populated. Not perfect, as for non visible items the
height might be off, if they have font override tags, but I guess we
can live with the consequences. It's rather a fringe feature anyhow.

CCBUG: 244503

 M  +12 -0     messageitem.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1150006
Comment 4 Volker Krause 2010-07-16 11:12:52 UTC
Fixed according to Thomas. Ludwig, please reopen if it still happens for you.
Comment 5 Thomas McGuire 2010-07-22 12:40:31 UTC
*** Bug 243829 has been marked as a duplicate of this bug. ***