Review Request: Shared empty private class for KTimeZoneBackend

Volker Krause vkrause at
Mon Jun 13 10:38:45 BST 2011

This is an automatically generated e-mail. To reply, visit:

(Updated June 13, 2011, 9:38 a.m.)

Review request for kdelibs, John Layt and David Jarvie.


Fix the assert found by Michael as suggested by David.


This patch makes KTimeZoneBackend use a shared empty private class, an optimization done in a few other places around KDateTime already.

This specific place turned up during memory-profiling KMail with folders containing ~100k messages. KMail (via KMime) creates one KDateTime object per message (using OffsetFromUTC mode), each of which contains two (empty) KTimeZone objects. The resulting 200k (identical) KTimeZoneBackend objects use about 20Mb of heap memory according to massif.

Diffs (updated)

  kdecore/date/ktimezone.cpp f38deed 



kdecore unit tests still pass, KMail also still works fine, but I have no idea if this has side-effects on other, more complex use-cases



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list