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

laurent Montel montel at kde.org
Sat Oct 11 22:23:18 BST 2014


Le Saturday 11 October 2014 20:07:03 David Faure a écrit :
> 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. 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?

We still have kontact mobile but last time that I launched it it was totally 
broken.

During this summer, some patchs were created to rework it.
But no news.

So to conclude it's not supported.

> 
> * 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....)

For me remove this code directly.
If kontact is rework we will find another method for it.
Better to improve active project :)

Regards

-- 
Laurent Montel | laurent.montel at kdab.com | KDE/Qt Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53,  http://www.kdab.fr


_______________________________________________
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