about summary refs log tree commit diff
path: root/src/libstore/s3-binary-cache-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2016-11-16T15·21+0100
committerEelco Dolstra <edolstra@gmail.com>2016-11-16T15·21+0100
commit4be4f6de56f4de77f6a376f1a40ed75eb641bb89 (patch)
treedbaa5c53f816f85cde44e0c89661b67a6a0a4b92 /src/libstore/s3-binary-cache-store.cc
parent10ae8fabf1e7e7bd8817b93560df7484c3bd18b8 (diff)
S3BinaryCacheStore:: Eliminate a string copy while uploading
This cuts hydra-queue-runner's peak memory usage by about a third.
Diffstat (limited to 'src/libstore/s3-binary-cache-store.cc')
-rw-r--r--src/libstore/s3-binary-cache-store.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc
index c11f2b06b990..1bc8576a8aef 100644
--- a/src/libstore/s3-binary-cache-store.cc
+++ b/src/libstore/s3-binary-cache-store.cc
@@ -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);