[Kde-pim] Still hunting for speed: now CollectionSyncProgressRole

Christian Mollekopf chrigi_1 at fastmail.fm
Mon Oct 20 08:42:13 BST 2014


On Saturday 11 October 2014 20.07:03 David Faure wrote:
> In commit bdb4102b92 for kdepimlibs, Tobias Koenig added
> CollectionSyncProgressRole to the ETM, which represents the progress of the
> sync for the folder. This data is updated very often during an imap sync.
> 
> E.g. my debug output shows:
> Collection QVariant(QString, "kde-pim") progress percent= 19
> Collection QVariant(QString, "kde-pim") progress percent= 23
> Collection QVariant(QString, "kde-pim") progress percent= 27
> Collection QVariant(QString, "kde-pim") progress percent= 30
> Collection QVariant(QString, "kde-pim") progress percent= 34
> Collection QVariant(QString, "kde-pim") progress percent= 38
> Collection QVariant(QString, "kde-pim") progress percent= 42
> Collection QVariant(QString, "kde-pim") progress percent= 46
> Collection QVariant(QString, "kde-pim") progress percent= 50
> 
> The problem is that it leads to emitting dataChanged(index) in the ETM,
> which triggers the many layers of proxymodels on top of that model.
> I once ended up in a 80 levels call stack from that signal...
> QElapsedTimer says every one of these dataChanged calls takes 50ms on
> average. 

This seems insanely long. Could it be that one of the proxy models turns this 
into a layoutChanged that causes the favoritesproxymodel problem?

> Surely this can't help for speed, especially since we *never ever*
> use that information in the GUI (the sync progress is shown in the kmail
> statusbar, not in a view connected to the ETM).
> 
> The reason we have CollectionSyncProgressRole is only for the QML
> GUI (Kontact Mobile).
> 
> kdepim-runtime/qml/akonadi/CollectionDelegate.qml says:
> width: ((parent.width * (model.collectionSyncProgress == 100 ? 0 :
>    model.collectionSyncProgress)) / 100)
> 
> =>
> 
> * Do we still support Kontact Mobile?
> 
> * If so, can we come up with a better way to show the sync progress in the
> GUI, without it coming from ETM?
> 
> * Or maybe I should just add a boolean setter in the ETM, say
>   setSyncProgressRoleEnabled(bool b), off by default, and only enable
>   that in kdepim-runtime/qml somehow? (don't know where, it doesn't
>   seem to use ETM directly....)

I'm in favor of simply dropping the code. It might be useful someday, but 
we'll add it when we require it.

Cheers,
Christian

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list