mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
Make 'nix copy --from ssh://...' run in constant memory
For instance, this reduced the memory consumption of $ nix copy --from ssh://localhost --to ~/my-nix /nix/store/1n7x0yv8vq6zi90hfmian84vdhd04bgp-blender-2.79a from 632 MiB to 16 MiB.
This commit is contained in:
parent
92dfc22327
commit
47f7e5585b
4 changed files with 22 additions and 24 deletions
|
@ -151,12 +151,7 @@ struct LegacySSHStore : public Store
|
|||
|
||||
conn->to << cmdDumpStorePath << path;
|
||||
conn->to.flush();
|
||||
|
||||
/* FIXME: inefficient. */
|
||||
ParseSink parseSink; /* null sink; just parse the NAR */
|
||||
TeeSource savedNAR(conn->from);
|
||||
parseDump(parseSink, savedNAR);
|
||||
sink(*savedNAR.data);
|
||||
copyNAR(conn->from, sink);
|
||||
}
|
||||
|
||||
PathSet queryAllValidPaths() override { unsupported(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue