Revision 2aa12df...

Go back to digest for 8th July 2012

Optimization in KDE-PIM

Sergio Luis Martins committed changes in [kdepim] calendarsupport/utils.cpp:

Reduce Item::hasPayload() calls.

Item::payload() already calls hasPayload() internally, and emits
an exception if the item does not have a payload.

So, use a try-catch block instead, to save 1 hasPayload() call,
which results in a 7% performance improvement.

I also added a incidence->type() comparison first, to avoid
throwing exceptions, because _cxa_rethrow appeared on callgrind,
so this is the fastest we can get.

File Changes

Modified 1 files
  • calendarsupport/utils.cpp
1 files changed in total