Review Request 117668: Zoom zoom zoom: Remove internal countContacts function, makes the contact list a /lot/ faster

Martin Klapetek martin.klapetek at gmail.com
Tue Apr 22 07:45:53 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117668/#review56161
-----------------------------------------------------------

Ship it!


This is pretty clever, how we didn't think of something that simple before... :D

- Martin Klapetek


On April 21, 2014, 12:25 a.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117668/
> -----------------------------------------------------------
> 
> (Updated April 21, 2014, 12:25 a.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Repository: ktp-common-internals
> 
> 
> Description
> -------
> 
> Remove internal countContacts function
> 
> This method counted the contacts in a group every time a contact in that
> group changed. This meant on every insertion we would loop through the
> entire set of contacts to make the new count.
> 
> Assuming all contacts come online we end up making contacts^2 calls to
> data() which is obviously really slow. On my system KPeople::data()
> showed over 300,000 calls on load
> 
> Instead strip this code and re-insert a simple filter at the contact
> list level (see patch to contact list)
> 
> 
> Diffs
> -----
> 
>   KTp/Models/contacts-filter-model.h bccc6f6 
>   KTp/Models/contacts-filter-model.cpp 617d3aa 
> 
> Diff: https://git.reviewboard.kde.org/r/117668/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20140422/0dce98b7/attachment.html>


More information about the KDE-Telepathy mailing list