From 69befbf8072196103046f8a49fce7547310508fa Mon Sep 17 00:00:00 2001 From: Dave Watson Date: Wed, 8 Apr 2015 10:45:08 -0700 Subject: [PATCH] AsyncSocketHandler cacheChainLength Summary: Is there any reason we shouldn't just cache the chain length everywhere? Currently the pipeline does a lot of passing of buffers between IOBufQueues, I wonder if we can get even smarter about passing the length around Test Plan: used in telnet server diff Reviewed By: hans@fb.com Subscribers: doug, fugalh, folly-diffs@, jsedgwick, yfeldblum, chalfant FB internal diff: D1959167 Signature: t1:1959167:1427934568:eb9a49514b2bb7d157879bb8efa99f12092d5e95 --- folly/wangle/channel/AsyncSocketHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/wangle/channel/AsyncSocketHandler.h b/folly/wangle/channel/AsyncSocketHandler.h index 5fc0b680..b5be966f 100644 --- a/folly/wangle/channel/AsyncSocketHandler.h +++ b/folly/wangle/channel/AsyncSocketHandler.h @@ -146,7 +146,7 @@ class AsyncSocketHandler }; Context* ctx_{nullptr}; - folly::IOBufQueue bufQueue_; + folly::IOBufQueue bufQueue_{folly::IOBufQueue::cacheChainLength()}; std::shared_ptr socket_{nullptr}; }; -- 2.34.1