[Kde-pim] Review Request 110302: Save memory in VCardParser by sharing common strings

Milian Wolff mail at milianw.de
Sat May 4 19:28:32 BST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110302/
-----------------------------------------------------------

Review request for KDEPIM-Libraries.


Description
-------

    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.


Diffs
-----

  kabc/vcardparser/vcardparser.cpp c7b7a5a 

Diff: http://git.reviewboard.kde.org/r/110302/diff/


Testing
-------

    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.


Thanks,

Milian Wolff

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list