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

Daniel Vratil dvratil at redhat.com
Mon Oct 13 10:11:42 BST 2014


On Saturday 11 of October 2014 23:23:18 laurent Montel wrote:
> 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 :)

I think Michael Bohlender now maintains the Active part, right? 

I'm not against removing it completely, but then we would end up with an enum 
that does nothing, and we can't really remove it for API/ABI compatibility.

> 
> Regards

-- 
Daniel Vrátil | dvratil at redhat.com | dvratil on #kde-devel, #kontact, #akonadi
Software Engineer - KDE Desktop Team, Red Hat Inc.

GPG Key: 0xC59D614F6F4AE348
Fingerprint: 4EC1 86E3 C54E 0B39 5FDD B5FB C59D 614F 6F4A E348
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20141013/f3b93fb7/attachment.sig>
-------------- next part --------------
_______________________________________________
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