Preallocate space when unfolding headers

Authored by dvratil on Oct 13 2017, 3:04 PM.

Description

Preallocate space when unfolding headers

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.

Reviewers: vkrause

Reviewed By: vkrause

Subscribers: mlaurent, KDE PIM

Tags: KDE PIM

Differential Revision: https://phabricator.kde.org/D8246

Details

Committed
dvratilOct 13 2017, 3:04 PM
Reviewer
vkrause
Differential Revision
D8246: Preallocate space when unfolding headers
Parents
R180:43551df11b2b: Remove unused variables
Branches
Unknown
Tags
Unknown