Revision 50d1767...

Go back to digest for 11th November 2012

Features in KDE-PIM

Martin Klapetek committed changes in [kdepimlibs] /socialutils:

Cache KDateTime in SocialFeedItem

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.

Reviewed-by: Kevin Krammer
REVIEW: 107113

File Changes

Modified 3 files
  • /socialutils
  •   akonadi/socialfeeditem.cpp
  •   akonadi/socialfeeditem.h
  •   akonadi/serializer/akonadi_serializer_socialfeeditem.cpp
3 files changed in total