Revision f05b2e6...

Go back to digest for 22nd May 2011

Optimization in KDE Base

David Jarvie committed changes in [kdelibs] /:

Cache values for offsetAtZoneTime() and offsetAtUtc()

As pointed out by Sérgio Martins, callgrind shows that
KTimeZone::offsetAtZoneTime() uses a lot of CPU. The time zone
transition is now cached so that when it is called for successive
dates in the same year and season, the processing is minimal.

Cache use has been tested and the unit test expanded.

File Changes

Modified 3 files
  •   kdecore/date/ktimezone.cpp
  •   kdecore/tests/ktimezonestest.cpp
  •   kdecore/tests/ktimezonestest.h
3 files changed in total