[Korganizer-devel] [Bug 170993] Switching calendar views takes more than 20 seconds eating 100% CPU

Eduardo Habkost ehabkost at raisama.net
Mon Dec 29 02:47:51 CET 2008


http://bugs.kde.org/show_bug.cgi?id=170993





--- Comment #5 from Eduardo Habkost <ehabkost raisama net>  2008-12-29 02:47:50 ---
(In reply to comment #2)
> Created an attachment (id=28566)
 --> (http://bugs.kde.org/attachment.cgi?id=28566) [details]
> Patch to speed up size calculation of rich text delegate
> 
> This patch speeds up the calculation of the size hint for rich text delegates
> by introducing a new QTextDocument member variable which avoids creating a
> temporary QTextDocument for each call of sizeHint().
> Eduardo, would you mind to test it to see if it improves performance? The patch
> should be applied in korganizer/views/todoview.

Hi,

Sorry for taking so long to reply. I've tested the patch and the situation
improved, but it is not perfect yet.

Now instead of taking up to 40 seconds, it takes around 1.6 seconds on the
first reloadTodos() call, and around 12 seconds on the second reloadTodos()
call.

I've seen it spending time destroying QTextObject objects on the loop (see
backtrace below), but I didn't profile it (yet) to check if this is really the
main place where it is eating CPU, now.

#0  0x06bdc6a4 in QObjectPrivate::removePendingChildInsertedEvents () from
/usr/lib/libQtCore.so.4
#1  0x03cb9f2f in QApplication::notify () from /usr/lib/libQtGui.so.4
#2  0x0032492f in KApplication::notify (this=0xbfe7aae4, receiver=0x960bfe0,
event=0xbfe78f18)
    at
/mnt/common/code/kde/svn/trunk/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#3  0x06bce2f1 in QCoreApplication::notifyInternal () from
/usr/lib/libQtCore.so.4
#4  0x06be5fae in QCoreApplication::sendEvent () from /usr/lib/libQtCore.so.4
#5  0x06bdcb64 in QObjectPrivate::setParent_helper () from
/usr/lib/libQtCore.so.4
#6  0x06be5208 in QObject::~QObject () from /usr/lib/libQtCore.so.4
#7  0x03ecdbd8 in QTextObject::~QTextObject () from /usr/lib/libQtGui.so.4
#8  0x03ecdc22 in QTextFrame::~QTextFrame () from /usr/lib/libQtGui.so.4
#9  0x03ee5d8b in ?? () from /usr/lib/libQtGui.so.4
#10 0x03ed5542 in QTextDocument::setHtml () from /usr/lib/libQtGui.so.4
#11 0x0089ef3c in KOTodoRichTextDelegate::sizeHint (this=0x8dc0e40,
option=@0xbfe79234, index=@0xbfe792b4)
    at
/mnt/common/code/kde/svn/trunk/KDE/kdepim/korganizer/views/todoview/kotododelegates.cpp:467


-- 
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Korganizer-devel mailing list