1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-19 08:49:35 +01:00

LocalStore::addToStoreFromDump copy in chunks

Rather than copying byte-by-byte, we let the coroutine know how much
data we would like it to send back to us.
This commit is contained in:
John Ericson 2020-07-11 23:40:49 +00:00
parent 9de96ef7d4
commit 592851fb67
4 changed files with 40 additions and 22 deletions

View file

@ -292,7 +292,7 @@ private:
StorePath addToStoreCommon(
const string & name, FileIngestionMethod method, HashType hashAlgo, RepairFlag repair,
std::function<void(Sink &)> demux);
std::function<void(Sink &, size_t &)> demux);
Path getRealStoreDir() override { return realStoreDir; }