You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/08/25 01:28:34 UTC

[GitHub] [rocketmq-client-cpp] lizhanhui commented on a diff in pull request #441: reduce unnecessary tmp copy

lizhanhui commented on code in PR #441:
URL: https://github.com/apache/rocketmq-client-cpp/pull/441#discussion_r954422205


##########
src/MQClientAPIImpl.cpp:
##########
@@ -268,7 +268,7 @@ void MQClientAPIImpl::sendHeartbeat(const string& addr,
   string body;
   pHeartbeatData->Encode(body);
   request.SetBody(body.data(), body.length());

Review Comment:
   Line #270 and #271 duplicate. The data is copied twice.



##########
src/MQClientAPIImpl.cpp:
##########
@@ -888,7 +888,7 @@ void MQClientAPIImpl::lockBatchMQ(const string& addr,
   string body;
   requestBody->Encode(body);
   request.SetBody(body.data(), body.length());

Review Comment:
   Same here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org