Bug 142010

Summary: Repainting takes too long in when filtering for unread messages
Product: [Applications] kmail Reporter: Dima Ryazanov <dima>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description Dima Ryazanov 2007-02-21 07:32:09 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 4.1.1 (Gentoo 4.1.1-r3) 
OS:                Linux

I have 10354 email messages in one of the folders, with 113 of them unread. If I tell Kontact to display only the messages with the "Unread" status, and scroll to the very top to see the first one, it takes about 5-10 seconds to display the list. (Happens for any "paint" event - when scrolling, moving another window on top of Kontact, etc.)

If the first message is not visible, everything works fast. If all messages are displayed, or only the ones with attachments, it's also fine.

The delay decreases if I decreases the number of messages. With 4000 messages, it's almost unnoticeable.

Backtrace during the delay:

#0  0xb6a1ffbb in QListViewItem::itemAbove () from /usr/qt/3/lib/libqt-mt.so.3
#1  0xb71f14fb in KListViewItem::isAlternate () from /usr/kde/3.5/lib/libkdeui.so.4
#2  0xb71f17af in KListViewItem::backgroundColor () from /usr/kde/3.5/lib/libkdeui.so.4
#3  0xb71f1a73 in KListViewItem::paintCell () from /usr/kde/3.5/lib/libkdeui.so.4
#4  0xb585e564 in KMail::HeaderItem::paintCell () from /usr/kde/3.5/lib/libkmailprivate.so
#5  0xb6a29df1 in QListView::drawContentsOffset () from /usr/qt/3/lib/libqt-mt.so.3
#6  0xb6a559bf in QScrollView::viewportPaintEvent () from /usr/qt/3/lib/libqt-mt.so.3
#7  0xb71f319a in KListView::viewportPaintEvent () from /usr/kde/3.5/lib/libkdeui.so.4
#8  0xb6a5676f in QScrollView::eventFilter () from /usr/qt/3/lib/libqt-mt.so.3
#9  0xb6a25656 in QListView::eventFilter () from /usr/qt/3/lib/libqt-mt.so.3
#10 0xb584e689 in KMHeaders::eventFilter () from /usr/kde/3.5/lib/libkmailprivate.so
#11 0xb69448ac in QObject::activate_filters () from /usr/qt/3/lib/libqt-mt.so.3
#12 0xb694491b in QObject::event () from /usr/qt/3/lib/libqt-mt.so.3
#13 0xb697cf8c in QWidget::event () from /usr/qt/3/lib/libqt-mt.so.3
#14 0xb68e6457 in QApplication::internalNotify () from /usr/qt/3/lib/libqt-mt.so.3
#15 0xb68e6fd1 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3
#16 0xb6ee62de in KApplication::notify () from /usr/kde/3.5/lib/libkdecore.so.4
#17 0xb687a762 in QETWidget::translatePaintEvent () from /usr/qt/3/lib/libqt-mt.so.3
#18 0xb688614b in QApplication::x11ProcessEvent () from /usr/qt/3/lib/libqt-mt.so.3
#19 0xb689693a in QEventLoop::processEvents () from /usr/qt/3/lib/libqt-mt.so.3
#20 0xb68fcb50 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3
#21 0xb68fc9d6 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3
#22 0xb68e5eef in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3
#23 0x08058aac in ?? ()
#24 0xbfae4988 in ?? ()
#25 0x00000001 in ?? ()
#26 0x00000001 in ?? ()
#27 0x00000000 in ?? ()
Comment 1 Thomas McGuire 2007-02-21 17:38:35 UTC
Is using the quick search above the message list equally slow? If this is the case, the problem is likely the same as in bug #126103.
Comment 2 Dima Ryazanov 2007-02-21 17:47:39 UTC
No, quick search works fine...

But it does look very similar to the other bug - especially the "alternative background of KListView" comment. I noticed the "KListViewItem::isAlternate ()" call in my backtrace, so it might be the same problem.
Comment 3 Bram Schoenmakers 2007-02-25 21:38:56 UTC
Most probably bug 138912 describes the more general case of this problem.

*** This bug has been marked as a duplicate of 138912 ***