hunyadi-dev commented on a change in pull request #979: URL: https://github.com/apache/nifi-minifi-cpp/pull/979#discussion_r584704996
########## File path: extensions/aws/s3/S3WrapperBase.cpp ########## @@ -144,7 +144,7 @@ bool S3WrapperBase::deleteObject(const std::string& bucket, const std::string& o int64_t S3WrapperBase::writeFetchedBody(Aws::IOStream& source, const int64_t data_size, const std::shared_ptr<io::BaseStream>& output) { static const uint64_t BUFFER_SIZE = 4096; std::vector<uint8_t> buffer; - buffer.reserve(BUFFER_SIZE); + buffer.resize(BUFFER_SIZE); Review comment: Both the static bufffer size and the preallocation adds performance overhead. You could move buffer size to a class level static variable or just: ```c++ std::vector<unsigned char> buffer(4096); ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org