Commit 159abaf2 authored by Milian Wolff's avatar Milian Wolff

Reserve room for 16 response headers by default.

In my data, most often the final size of fetchResponse is 16.
By reserving that data upfront, we can get rid of 3/4 of the
list allocations, according to the growth-strategy outlined here:
http://qt-project.org/doc/qt-4.8/containers.html#growth-strategies
I.e. before, we'd allocate 4, 8, 12, 16. Now we directly allocate
room for 16.

REVIEW: 121408
parent ba9ac17e
......@@ -202,6 +202,7 @@ void ItemFetchJob::doHandleResponse(const QByteArray &tag, const QByteArray &dat
// split fetch response into key/value pairs
QList<QByteArray> fetchResponse;
fetchResponse.reserve(16);
ImapParser::parseParenthesizedList(data, fetchResponse, begin + 6);
Item item;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment