lix/src/libutil
Eelco Dolstra 75989bdca7 Make computeFSClosure() single-threaded again
The fact that queryPathInfo() is synchronous meant that we needed a
thread for every concurrent binary cache lookup, even though they end
up being handled by the same download thread. Requiring hundreds of
threads is not a good idea. So now there is an asynchronous version of
queryPathInfo() that takes a callback function to process the
result. Similarly, enqueueDownload() now takes a callback rather than
returning a future.

Thus, a command like

  nix path-info --store https://cache.nixos.org/ -r /nix/store/slljrzwmpygy1daay14kjszsr9xix063-nixos-16.09beta231.dccf8c5

that returns 4941 paths now takes 1.87s using only 2 threads (the main
thread and the downloader thread). (This is with a prewarmed
CloudFront.)
2016-09-16 18:54:14 +02:00
..
affinity.cc Build sandbox support etc. unconditionally on Linux 2015-12-10 11:47:17 +01:00
affinity.hh Run the daemon worker on the same CPU as the client 2013-08-07 14:02:04 +02:00
archive.cc Modernize AutoCloseFD 2016-07-11 15:44:44 -04:00
archive.hh Add NAR / Store accessor abstraction 2016-02-25 17:43:19 +01:00
args.cc nix --help: Show short flags 2016-04-21 14:34:46 +02:00
args.hh nix --help: Show short flags 2016-04-21 14:34:46 +02:00
compression.cc Do compression in a sink 2016-05-04 16:16:53 +02:00
compression.hh Do compression in a sink 2016-05-04 16:16:53 +02:00
finally.hh Eliminate the substituter mechanism 2016-04-29 13:57:08 +02:00
hash.cc Fix assertion failure 2016-07-21 18:39:32 +02:00
hash.hh Cache path info lookups in SQLite 2016-04-20 14:12:38 +02:00
json.cc Fix 32-bit build 2016-08-30 17:38:09 +02:00
json.hh Fix 32-bit build 2016-08-30 17:38:09 +02:00
local.mk use $(LIBLZMA_LIBS) instead of -llzma 2016-05-31 03:20:11 -04:00
logging.cc printMsg(): Don't check for interrupts 2016-09-16 18:52:42 +02:00
logging.hh Improved logging abstraction 2016-04-25 19:18:45 +02:00
lru-cache.hh Move path info caching from BinaryCacheStore to Store 2016-04-19 18:52:53 +02:00
monitor-fd.hh Pedantry 2014-12-14 01:51:14 +01:00
pool.hh std::condition_variable_any -> std::condition_variable 2016-02-24 13:31:46 +01:00
ref.hh Allow setting the state directory as a store parameter 2016-06-02 16:02:48 +02:00
regex.cc Add a primop for regular expression pattern matching 2014-11-25 11:47:06 +01:00
regex.hh Add a primop for regular expression pattern matching 2014-11-25 11:47:06 +01:00
serialise.cc Make Buffered{Source,Sink} move-safe 2016-07-13 06:03:37 -04:00
serialise.hh FdSink: Restore move constructor/assignment 2016-07-13 06:27:41 -04:00
sync.hh Make LocalStore thread-safe 2016-04-08 18:07:13 +02:00
thread-pool.cc Fix assertion failure in ThreadPool::enqueue() 2016-07-21 18:14:16 +02:00
thread-pool.hh Fix assertion failure in ThreadPool::enqueue() 2016-07-21 18:14:16 +02:00
types.hh Improved logging abstraction 2016-04-25 19:18:45 +02:00
util.cc Make computeFSClosure() single-threaded again 2016-09-16 18:54:14 +02:00
util.hh Make computeFSClosure() single-threaded again 2016-09-16 18:54:14 +02:00
xml-writer.cc OCD: foreach -> C++11 ranged for 2015-07-17 20:13:56 +02:00
xml-writer.hh And another one 2014-02-26 18:55:18 +01:00