D8246: Preallocate space when unfolding headers

Daniel Vrátil noreply at phabricator.kde.org
Wed Oct 11 14:57:46 BST 2017


dvratil created this revision.
dvratil added a reviewer: vkrause.
Restricted Application added a project: KDE PIM.
Restricted Application added a subscriber: KDE PIM.

REVISION SUMMARY
  Unfolding headers skips the line-break and indentation characters
  so the result will be at worst the same size as the original header.
  Since unfolding is implemented as appending characters one by one to
  the result bytearray, we can pre-allocate the destination field at
  the beginning of the loop.

REPOSITORY
  R180 PIM: KMime

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D8246

AFFECTED FILES
  src/kmime_util.cpp

To: dvratil, vkrause
Cc: #kde_pim, dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20171011/eca020ae/attachment.html>


More information about the kde-pim mailing list