From 47f7e5585bbb9a6acfaddda7327ba4eeb5b662c2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 21 Mar 2018 22:56:02 +0100 Subject: 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. --- src/libutil/archive.hh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libutil/archive.hh') diff --git a/src/libutil/archive.hh b/src/libutil/archive.hh index 8a15e849c7..7a0e688e42 100644 --- a/src/libutil/archive.hh +++ b/src/libutil/archive.hh @@ -74,6 +74,9 @@ void parseDump(ParseSink & sink, Source & source); void restorePath(const Path & path, Source & source); +/* Read a NAR from 'source' and write it to 'sink'. */ +void copyNAR(Source & source, Sink & sink); + // FIXME: global variables are bad m'kay. extern bool useCaseHack; -- cgit 1.4.1