Commit 4aa901d0 authored by Jon Maltiel Swenson's avatar Jon Maltiel Swenson Committed by Facebook Github Bot 5

Optimize away IOBuf clones on hot path

Summary:
'get' is the most frequent memcached operation. On a get reply, we should go to heap
as little as possible.  This diff optimizes for this scenario, where replies
have only one IOBuf field.

Reviewed By: pavlo-fb

Differential Revision: D3226592

fb-gh-sync-id: 92e1a1fac5735bd268691cf11990a96ae6fa8309
fbshipit-source-id: 92e1a1fac5735bd268691cf11990a96ae6fa8309
parent 545134d1
......@@ -913,6 +913,10 @@ class QueueAppender : public detail::Writable<QueueAppender> {
}
}
void insert(const folly::IOBuf& buf) {
insert(buf.clone());
}
private:
folly::IOBufQueue* queue_;
size_t growth_;
......
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