guix/nix/nix-daemon
Ludovic Courtès 9a8f9f84cc
daemon: Buffer data sent to clients by the 'export-path' RPC.
Before that we'd have STDERR_WRITE round trips for very small amounts of
data, ranging from a few bytes for the metadata of nars to the size of
one file being exported.

With this change, something like:

  guix archive --export /gnu/store/5rrsbaghh5ix1vjcicsl60gsxilhjnf2-coreutils-8.25 | dd of=/dev/null

reports a throughput of 35 MB/s instead of 25 MB/s before.

* nix/nix-daemon/nix-daemon.cc (TunnelSink): Inherit from 'BufferedSink'
rather than 'Sink'.  Rename 'operator ()' to 'write'.
(performOp) <wopExportPath>: Add 'sink.flush' call.
2016-12-01 23:35:10 +01:00
..
guix-daemon.cc build: Default to "https://mirror.hydra.gnu.org/" for substitutes. 2016-03-16 11:27:37 +01:00
nix-daemon.cc daemon: Buffer data sent to clients by the 'export-path' RPC. 2016-12-01 23:35:10 +01:00
shared.hh Update license headers. 2013-01-06 00:47:50 +01:00