lix/src/libstore
Eelco Dolstra 48662d151b
Reduce substitution memory consumption
copyStorePath() now pipes the output of srcStore->narFromPath()
directly into dstStore->addToStore(). The sink used by the former is
converted into a source usable by the latter using
boost::coroutine2. This is based on [1].

This reduces the maximum resident size of

  $ nix build --store ~/my-nix/ /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1 --substituters file:///tmp/binary-cache-xz/ --no-require-sigs

from 418592 KiB to 53416 KiB. (The previous commit also reduced the
runtime from ~4.2s to ~3.4s, not sure why.) A further improvement will
be to download files into a Sink.

[1] https://github.com/NixOS/nix/compare/master...Mathnerd314:dump-fix-coroutine#diff-dcbcac55a634031f9cc73707da6e4b18

Issue #1969.
2018-03-16 20:35:59 +01:00
..
binary-cache-store.cc decompress(): Use a Source and Sink 2018-03-16 20:35:59 +01:00
binary-cache-store.hh move the parallel-compression setting to binary-cache-store, the setting 2018-02-07 21:06:11 +01:00
build.cc Use boost::format from the boost package 2018-03-14 19:24:04 +01:00
builtins.cc Don't remove Content-Encoding in fetchurl / nix-prefetch-url 2017-09-18 11:07:28 +02:00
builtins.hh Support netrc in <nix/fetchurl.nix> 2017-02-16 15:51:50 +01:00
crypto.cc binary-cache-public-keys -> trusted-public-keys 2017-11-20 17:32:34 +01:00
crypto.hh Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
derivations.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
derivations.hh Replace a few bool flags with enums 2017-07-03 11:38:08 +02:00
download.cc Don't retry on CURLE_SSL_CACERT_BADFILE 2018-03-16 12:03:18 +01:00
download.hh Wrap thread local in function for Cygwin 2018-03-12 00:56:41 -04:00
export-import.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
fs-accessor.hh nix ls-{nar,store}: Return offset of files in the NAR if known 2017-12-07 01:07:07 +01:00
gc.cc rand() -> random(), since we use srandom(). 2018-03-06 17:44:25 -06:00
globals.cc Merge branch 'register-settings' of https://github.com/shlevy/nix 2018-02-19 13:58:34 +01:00
globals.hh Revert "Enable sandbox builds on Linux by default" 2018-02-22 14:20:07 +01:00
http-binary-cache-store.cc Cleanup 2018-01-31 15:14:03 +01:00
legacy-ssh-store.cc LegacySSHStore: Include signatures etc. 2017-09-08 16:55:27 +02:00
local-binary-cache-store.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
local-fs-store.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
local-store.cc Reduce substitution memory consumption 2018-03-16 20:35:59 +01:00
local-store.hh Reduce substitution memory consumption 2018-03-16 20:35:59 +01:00
local.mk configure: Add a flag to disable seccomp. 2018-02-18 02:35:01 -05:00
machines.cc Allow shorter syntax for chroot stores 2017-10-24 15:32:38 +02:00
machines.hh Replace $NIX_REMOTE_SYSTEMS with an option "builder-files" 2017-05-02 15:46:09 +02:00
misc.cc Call queryMissing() prior to building 2017-08-31 16:05:07 +02:00
nar-accessor.cc Provide random access to cached NARs 2017-12-07 01:07:07 +01:00
nar-accessor.hh Fix build on gcc 7 2017-12-16 00:49:31 +01:00
nar-info-disk-cache.cc Support base-64 hashes 2017-07-04 15:07:41 +02:00
nar-info-disk-cache.hh HttpBinaryCacheStore: Fix caching of WantMassQuery 2016-06-01 16:24:17 +02:00
nar-info.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
nar-info.hh Make the store directory a member variable of Store 2016-06-01 16:24:17 +02:00
nix-store.pc.in Install some pkgconfig files 2014-09-18 12:00:40 +02:00
optimise-store.cc rand() -> random(), since we use srandom(). 2018-03-06 17:44:25 -06:00
pathlocks.cc Fix 'deadlock: trying to re-acquire self-held lock' 2018-02-12 17:06:06 +01:00
pathlocks.hh Fix 'deadlock: trying to re-acquire self-held lock' 2018-02-12 17:06:06 +01:00
profiles.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
profiles.hh Allow setting the state directory as a store parameter 2016-06-02 16:02:48 +02:00
references.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
references.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
remote-fs-accessor.cc Provide random access to cached NARs 2017-12-07 01:07:07 +01:00
remote-fs-accessor.hh Provide random access to cached NARs 2017-12-07 01:07:07 +01:00
remote-store.cc remote_store: register for NIX_REMOTE=unix://path 2018-01-26 22:05:16 +00:00
remote-store.hh ssh-ng: Don't forward options to the daemon. 2018-03-05 07:42:15 -05:00
s3-binary-cache-store.cc Check aws-sdk-cpp version 2017-12-22 12:05:13 +01:00
s3-binary-cache-store.hh Fix getS3Stats() 2016-10-06 17:00:52 +02:00
s3.hh Add a "profile" option to S3BinaryCacheStore 2017-11-15 14:18:20 +01:00
sandbox-defaults.sb Remove extraneous comment 2017-11-08 16:17:32 +01:00
sandbox-minimal.sb Always use the Darwin sandbox 2017-06-06 18:44:49 +02:00
sandbox-network.sb OS X sandbox: Improve builtin sandbox profile 2017-05-31 17:25:51 +02:00
schema.sql Mark content-addressed paths in the Nix database and in .narinfo 2016-08-10 18:05:35 +02:00
serve-protocol.hh LegacySSHStore: Include signatures etc. 2017-09-08 16:55:27 +02:00
sqlite.cc Use boost::format from the boost package 2018-03-14 19:24:04 +01:00
sqlite.hh Use boost::format from the boost package 2018-03-14 19:24:04 +01:00
ssh-store.cc ssh-ng: Don't forward options to the daemon. 2018-03-05 07:42:15 -05:00
ssh.cc Disallow SSH host names starting with a dash 2017-08-16 20:55:58 +02:00
ssh.hh Disallow SSH host names starting with a dash 2017-08-16 20:55:58 +02:00
store-api.cc Reduce substitution memory consumption 2018-03-16 20:35:59 +01:00
store-api.hh Reduce substitution memory consumption 2018-03-16 20:35:59 +01:00
worker-protocol.hh Don't send progress messages to older clients 2017-08-28 18:54:23 +02:00