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

Kevin Krammer krammer at kde.org
Sat May 4 20:32:39 BST 2013


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



kabc/vcardparser/vcardparser.cpp
<http://git.reviewboard.kde.org/r/110302/#comment23863>

    I would prefer this to be a normal method, maybe even call it fromLatin1



kabc/vcardparser/vcardparser.cpp
<http://git.reviewboard.kde.org/r/110302/#comment23862>

    I think even in our new coding style we have {} for one line blocks


- Kevin Krammer


On May 4, 2013, 6:29 p.m., Milian Wolff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110302/
> -----------------------------------------------------------
> 
> (Updated May 4, 2013, 6:29 p.m.)
> 
> 
> 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