Skip to content
Commit ab3e320b authored by Martin Klapetek's avatar Martin Klapetek
Browse files

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
parent 8d27820b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment