Page MenuHomePhorge

KMail: slow path that causes threading to take forever
Closed, WontfixPublic

Description

Sometimes we hit a slow path in kmail threading, where it kmail can max out a cpu for serval minutes to thread just a couple of thousand mails.

All time, according to sysprof, is spent in this codepath:

QAbstractItemModelPrivate::rowsAboutToBeRemoved(QModelIndex const&, int, int)                                                                            7.31%  73.98%
   MessageList::Core::Model::parent(QModelIndex const&) const                                                                                             5.81%  64.26%
     MessageList::Core::Model::index(MessageList::Core::Item*, int) const                                                                                 6.15%  52.34%
       MessageList::Core::Item::indexOfChildItem(MessageList::Core::Item*) const                                                                         17.49%  37.77%
         QList<MessageList::Core::Item*>::count() const                                                                                                   1.61%  14.72%
         QList<MessageList::Core::Item*>::at(int) const                                                                                                   1.47%   3.70%

This is likely an explosion of signals in the model stack, and not the threading code itself

Details

Ticket Type
Task

Event Timeline

mollekopf raised the priority of this task from to 60.
mollekopf updated the task description. (Show Details)
mollekopf added a project: KDE PIM.
mollekopf changed Ticket Type from Task to Task.
mollekopf subscribed.

First we need to figure out why we have so many rowsAboutToBeRemoved signals, if we indeed require that many, MessageList::Core::Model::index likely needs to be improved.

It's rather likely that we have too many signals in the first place though (we already know this for other signals, but failed to fix this properly so far).

vanmeeuwen lowered the priority of this task from 60 to Normal.Mar 28 2019, 8:13 AM
machniak claimed this task.
machniak subscribed.

Kolab support for KDE PIM is discontinued. Create a ticket on https://bugs.kde.org