[Kde-pim] Review Request: Cache KDateTime in SocialFeedItem

Kevin Krammer krammer at kde.org
Fri Nov 2 16:16:29 GMT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107113/#review21359
-----------------------------------------------------------

Ship it!


Ship It!

- Kevin Krammer


On Oct. 29, 2012, 2:28 p.m., Martin Klapetek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107113/
> -----------------------------------------------------------
> 
> (Updated Oct. 29, 2012, 2:28 p.m.)
> 
> 
> Review request for KDEPIM and KDEPIM-Libraries.
> 
> 
> Description
> -------
> 
> SocialFeedItem::postTime() is accessed directly from the model and it's called a lot, putting the plasmoid through callgrind shows that creating the KDateTime everyone it's called is quite expensive, so now it's created just once and the existing KDateTime is returned.
> 
> I also removed the setters for postTimeString and postTimeFormat and left only one setter for setting them both at once, creating the KDateTime in that method as it needs both the format and string.
> 
> 
> Diffs
> -----
> 
>   akonadi/socialutils/serializer/akonadi_serializer_socialfeeditem.cpp a153d92 
>   akonadi/socialutils/socialfeeditem.h 2cbabe9 
>   akonadi/socialutils/socialfeeditem.cpp 6d6572b 
> 
> Diff: http://git.reviewboard.kde.org/r/107113/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Martin Klapetek
> 
>

_______________________________________________
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