Skip to content

Commit

Permalink
Update chunkSize to the suggested value
Browse files Browse the repository at this point in the history
This was a suggested course of action in a review in one of our earlier
commits, NixOS#3801 (comment)
  • Loading branch information
meditans committed Jul 21, 2020
1 parent 0835447 commit 922a845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstore/local-store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ StorePath LocalStore::addToStoreFromDump(Source & source0, const string & name,
or the original source is empty */
while (dump.size() < settings.narBufferSize) {
auto oldSize = dump.size();
constexpr size_t chunkSize = 1024;
constexpr size_t chunkSize = 65536;
auto want = std::min(chunkSize, settings.narBufferSize - oldSize);
dump.resize(oldSize + want);
auto got = 0;
Expand Down

0 comments on commit 922a845

Please sign in to comment.