[Kde-pim] Review Request 122321: FavoriteCollectionsModel: avoid calling reference() all the time

Christian Mollekopf chrigi_1 at fastmail.fm
Mon Mar 23 06:27:41 GMT 2015


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

Ship it!


Ship It!

- Christian Mollekopf


On March 22, 2015, 11:06 p.m., David Faure wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122321/
> -----------------------------------------------------------
> 
> (Updated March 22, 2015, 11:06 p.m.)
> 
> 
> Review request for KDEPIM-Libraries and Christian Mollekopf.
> 
> 
> Repository: kdepimlibs
> 
> 
> Description
> -------
> 
> For some reason I have some non-existing collection IDs in my config
> for favorites, so every call to reload() calls insertIfAvailable(dead_id)
> which called reference(dead_id), ending up in EntityTreeModelPrivate::indexForCollection
> where quite some iteration and linear searching happens.
> 
> => only reference() if we were actually able to select(), i.e.
> if the collection was found.
> This cuts by half the number of calls to indexForCollection, at least.
> 
> REVIEW: 122321
> 
> 
> Diffs
> -----
> 
>   akonadi/favoritecollectionsmodel.cpp 234fff5a57755a7b9001695aad40b9d417bc16f7 
> 
> Diff: https://git.reviewboard.kde.org/r/122321/diff/
> 
> 
> Testing
> -------
> 
> Running kmail, with debug output in select and reference, and in deselect and dereference. In my tests (including adding/removing a favorite) everything was called correctly.
> 
> 
> Thanks,
> 
> David Faure
> 
>

_______________________________________________
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