S3BinaryCacheStore:: Eliminate a string copy while uploading
This cuts hydra-queue-runner's peak memory usage by about a third.
This commit is contained in:
@@ -145,7 +145,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
|
||||
.WithBucket(bucketName)
|
||||
.WithKey(path);
|
||||
|
||||
auto stream = std::make_shared<std::stringstream>(data);
|
||||
auto stream = std::make_shared<istringstream_nocopy>(data);
|
||||
|
||||
request.SetBody(stream);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user