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

Martin Klapetek martin.klapetek at gmail.com
Mon Oct 29 14:28:52 GMT 2012


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

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