Bug 224037

Summary: handling of the filter rules window very slow in KDE 4.4. RC2
Product: [Applications] kmail Reporter: m.wege
Component: filteringAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal Keywords: akonadi-ports-regression, junior-jobs
Priority: LO    
Version: 1.13.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description m.wege 2010-01-24 14:33:32 UTC
Version:           1.13.0 (using 4.3.95 (KDE 4.3.95 (KDE 4.4 RC2)), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.31-18-generic

The filter rules window has become very slow in KDE 4.4.
Opening it, then the time it takes until the fields are filled out, each takes now between 30-60 seconds until it is done. It was ok in KDE 4.3
Comment 1 m.wege 2010-02-19 11:30:25 UTC
the bug is still present in kde 4.4.0 
mails are send out now, but the process is very slow
using top shows that nepomukservices and virtuoso-t are the cpu-drainers here as well as in bug #200453
could someone reassign this bug then to the nepomuk-folks?
Comment 2 Thomas McGuire 2010-02-19 13:37:04 UTC
The culprit is easy to see:

#7  0x00007f916896a5d1 in KJob::exec (this=0x3e4e4f0) at /media/kdedev/kde44/src/KDE/kdelibs/kdecore/jobs/kjob.cpp:204
#8  0x00007f915567ff61 in KabcBridge::categories () at /media/kdedev/kde44/src/KDE/kdepim/kmail/kmaddrbook.cpp:138
#9  0x00007f91558daa3d in (anonymous namespace)::TextRuleWidgetHandler::createValueWidget (this=0x3546a80, number=2, valueStack=0x302ae70, receiver=0x5803b20) at /media/kdedev/kde4
4/src/KDE/kdepim/kmail/rulewidgethandlermanager.cpp:464
#10 0x00007f91558db04d in KMail::RuleWidgetHandlerManager::createWidgets (this=0x58cb130, functionStack=0x63e9f00, valueStack=0x302ae70, receiver=0x5803b20) at /media/kdedev/kde44/
src/KDE/kdepim/kmail/rulewidgethandlermanager.cpp:291
#11 0x00007f9155635009 in KMSearchRuleWidget::initWidget (this=0x5803b20) at /media/kdedev/kde44/src/KDE/kdepim/kmail/kmsearchpatternedit.cpp:147
#12 0x00007f91556354c4 in KMSearchRuleWidget::KMSearchRuleWidget (this=0x5803b20, parent=0x3889750, aRule=0x0, headersOnly=false, absoluteDates=false) at /media/kdedev/kde44/src/KD
E/kdepim/kmail/kmsearchpatternedit.cpp:90
#13 0x00007f9155635584 in KMSearchRuleWidgetLister::createWidget (this=0x3889750, parent=0x3889750) at /media/kdedev/kde44/src/KDE/kdepim/kmail/kmsearchpatternedit.cpp:388
#14 0x00007f916c691eb6 in KPIM::KWidgetLister::addWidgetAtEnd (this=0x3889750, w=0x0) at /media/kdedev/kde44/src/KDE/kdepim/libkdepim/kwidgetlister.cpp:139
#15 0x00007f916c6919c8 in KPIM::KWidgetLister::setNumberOfShownWidgetsTo (this=0x3889750, aNum=3) at /media/kdedev/kde44/src/KDE/kdepim/libkdepim/kwidgetlister.cpp:181
#16 0x00007f91556349f0 in KMSearchRuleWidgetLister::setRuleList (this=0x3889750, aList=0x7184dd0) at /media/kdedev/kde44/src/KDE/kdepim/kmail/kmsearchpatternedit.cpp:352
#17 0x00007f9155634c27 in KMSearchPatternEdit::setSearchPattern (this=0x4254c00, aPattern=0x7184dd0) at /media/kdedev/kde44/src/KDE/kdepim/kmail/kmsearchpatternedit.cpp:484
#18 0x00007f915566b784 in KMFilterDlg::slotFilterSelected (this=0x666c820, aFilter=0x7184dd0) at /media/kdedev/kde44/src/KDE/kdepim/kmail/kmfilterdlg.cpp:428

It is only half a duplicate of bug 219687. The real fix would be to fetch the categories only once, and not each time when selecting a new filter, should be easy to change.
Comment 3 m.wege 2010-02-19 14:10:11 UTC
hope that setting the severity to low does not mean, that it wont be fixed in the 4.4 cycle. it is really slowing down filter configs very much, so that setting up a new filter or changing it, takes ages.
Comment 4 Thomas McGuire 2010-02-19 16:06:59 UTC
> hope that setting the severity to low does not mean, that it wont be fixed in
> the 4.4 cycle.

It means something else, we decided on a priority system for all bugs tagged with the akonadi-ports-regression.
4.4 branch is pretty much unaffected by that. Like all bugs, this will get fixed when somebody gets around doing so.
Comment 5 Thomas McGuire 2010-02-22 22:25:26 UTC
SVN commit 1094501 by tmcguire:

Remove the slow KabcBridge::categories().
Instead, populate the category list with Nepomuk tags. This should work, since all categories in contacts
get indexed as tags by the Nepomuk contact feeder.

MERGE: none (already in trunk)

BUG: 224037


 M  +0 -26     kmaddrbook.cpp  
 M  +0 -6      kmaddrbook.h  
 M  +7 -2      rulewidgethandlermanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1094501