Revision 545791a...

Go back to digest for 5th May 2013

Optimization in KDE-PIM

Milian Wolff committed changes in [kdepimlibs] kabc/vcardparser/vcardparser.cpp:

Save memory in VCardParser by sharing common strings.

Many strings common to the VCard format where not shared resulting
in an exessive memory consumption. Now these strings are interned
to leverage implicit sharing.

Note: To furthermore decrease the amount of QByteArray -> QString
conversions this code uses a (trivial) custom interning cache
instead of reusing Akonadi::Internal::SharedValuePool.

Massif shows that this patch reduces the memory consumption for
running testread on a file containing 10k randomly generated vcards
by ~6MB or by nearly 16% from a total of about 38MB.

REVIEW: 110302

File Changes

Modified 1 files
  • kabc/vcardparser/vcardparser.cpp
1 files changed in total