about summary refs log tree commit diff
path: root/src/libutil/serialise.cc
AgeCommit message (Collapse)AuthorFilesLines
2017-01-16 AutoDeleteArray -> std::unique_ptrEelco Dolstra1-4/+4
Also, switch to C++14 for std::make_unique.
2016-09-21 printMsg(lvlError, ...) -> printError(...) etc.Eelco Dolstra1-1/+1
2016-07-13 Make Buffered{Source,Sink} move-safeShea Levy1-21/+6
2016-03-04 Eliminate some large string copyingEelco Dolstra1-2/+2
2016-02-26 FdSource: track number of bytes readEelco Dolstra1-1/+2
2016-02-24 Remove bad daemon connections from the poolEelco Dolstra1-3/+19
This is necessary for long-running processes like hydra-queue-runner: if a nix-daemon worker is killed, we need to stop reusing that connection.
2015-09-03 Implement buildDerivation() via the daemonEelco Dolstra1-0/+7
2015-07-20 More cleanupEelco Dolstra1-56/+15
2015-07-17 OCD: foreach -> C++11 ranged forEelco Dolstra1-2/+2
2015-07-17 Allow remote builds without sending the derivation closureEelco Dolstra1-1/+31
Previously, to build a derivation remotely, we had to copy the entire closure of the .drv file to the remote machine, even though we only need the top-level derivation. This is very wasteful: the closure can contain thousands of store paths, and in some Hydra use cases, include source paths that are very large (e.g. Git/Mercurial checkouts). So now there is a new operation, StoreAPI::buildDerivation(), that performs a build from an in-memory representation of a derivation (BasicDerivation) rather than from a on-disk .drv file. The only files that need to be in the Nix store are the sources of the derivation (drv.inputSrcs), and the needed output paths of the dependencies (as described by drv.inputDrvs). "nix-store --serve" exposes this interface. Note that this is a privileged operation, because you can construct a derivation that builds any store path whatsoever. Fixing this will require changing the hashing scheme (i.e., the output paths should be computed from the other fields in BasicDerivation, allowing them to be verified without access to other derivations). However, this would be quite nice because it would allow .drv-free building (e.g. "nix-env -i" wouldn't have to write any .drv files to disk). Fixes #173.
2014-06-10 Print a warning when loading a large path into memoryEelco Dolstra1-0/+27
I.e. if you have a derivation with src = ./huge-directory; you'll get a warning that this is not a good idea.
2014-03-12 Remove unnecessary null pointer checksEelco Dolstra1-2/+2
Fixes #225.
2013-06-07 Process stderr from substituters while doing have/info queriesEelco Dolstra1-0/+6
2012-02-09 Use data() instead of c_str() where appropriateEelco Dolstra1-1/+1
2011-12-16 * importPath() -> importPaths(). Because of buffering of the inputEelco Dolstra1-5/+11
stream it's now necessary for the daemon to process the entire sequence of exported paths, rather than letting the client do it.
2011-12-16 * Avoid expensive conversions from char arrays to STL strings.Eelco Dolstra1-3/+18
2011-12-16 * Make the import operation through the daemon much more efficientEelco Dolstra1-12/+30
(way fewer roundtrips) by allowing the client to send data in bigger chunks. * Some refactoring.
2011-12-16 * Clean up exception handling.Eelco Dolstra1-2/+9
2011-12-15 * Refactoring: move sink/source buffering into separate classes.Eelco Dolstra1-23/+46
* Buffer the HashSink. This speeds up hashing a bit because it prevents lots of calls to the hash update functions (e.g. nix-hash went from 9.3s to 8.7s of user time on the closure of my /var/run/current-system).
2011-12-15 * Buffer reads in FdSource. Together with write buffering, thisEelco Dolstra1-1/+23
significantly cuts down the number of syscalls (e.g., for "nix-store -qR /var/run/current-system" via the daemon, it reduced the number of syscalls in the client from 29134 to 4766 and in the daemon from 44266 to 20666).
2011-12-14 * Buffer writes in FdSink. This significantly reduces the number ofEelco Dolstra1-1/+24
system calls / context switches when dumping a NAR and in the worker protocol.
2009-03-22 * NAR archives: handle files larger than 2^32 bytes. Previously itEelco Dolstra1-2/+2
would just silently store only (fileSize % 2^32) bytes. * Use posix_fallocate if available when unpacking archives. * Provide a better error message when trying to unpack something that isn't a NAR archive.
2008-06-18 * Some refactoring: put the GC options / results in separate structs.Eelco Dolstra1-0/+31
* The garbage collector now also prints the number of blocks freed.
2008-05-21 * GCC 4.3.0 (Fedora 9) compatibility fixes. Reported by Gour andEelco Dolstra1-0/+2
Armijn Hemel.
2006-12-04 * Daemon mode (`nix-worker --daemon'). Clients connect to the serverEelco Dolstra1-3/+4
via the Unix domain socket in /nix/var/nix/daemon.socket. The server forks a worker process per connection. * readString(): use the heap, not the stack. * Some protocol fixes.
2006-11-30 * More remote operations.Eelco Dolstra1-0/+18
* Added new operation hasSubstitutes(), which is more efficient than querySubstitutes().size() > 0.
2006-11-30 * Skeleton of the privileged worker program.Eelco Dolstra1-0/+87
* Some refactoring: put the NAR archive integer/string serialisation code in a separate file so it can be reused by the worker protocol implementation.