Compute FS closures in parallel
This is much faster.
This commit is contained in:
parent
b74e03a870
commit
2176c939fc
|
@ -5,7 +5,7 @@ with pkgs;
|
|||
let
|
||||
|
||||
# FIXME
|
||||
nix = builtins.storePath /nix/store/b554awsd9vssb936mb32icgpfbyifsai-nix-1.12pre1234_abcdef;
|
||||
nix = builtins.storePath /nix/store/cvrdgdx0gzdi0yf2831f4j98d518m3ln-nix-1.12pre1234_abcdef;
|
||||
#lib.overrideDerivation nixUnstable (orig: {
|
||||
# src = /home/eelco/Dev/nix;
|
||||
#});
|
||||
|
|
|
@ -69,7 +69,7 @@ void mainWrapped(int argc, char * * argv)
|
|||
auto localStore = openStore();
|
||||
std::string binaryCacheUri = argv[3];
|
||||
if (hasSuffix(binaryCacheUri, "/")) binaryCacheUri.pop_back();
|
||||
auto binaryCache = openStoreAt(binaryCacheUri);
|
||||
auto binaryCache = openStore(binaryCacheUri);
|
||||
|
||||
struct CacheState
|
||||
{
|
||||
|
@ -83,9 +83,7 @@ void mainWrapped(int argc, char * * argv)
|
|||
auto allowedPaths = tokenizeString<PathSet>(readFile(storePathsFile, true));
|
||||
|
||||
PathSet allowedPathsClosure;
|
||||
for (auto & path : allowedPaths)
|
||||
if (!allowedPathsClosure.count(path))
|
||||
binaryCache->computeFSClosure(path, allowedPathsClosure);
|
||||
binaryCache->computeFSClosure(allowedPaths, allowedPathsClosure);
|
||||
|
||||
printMsg(lvlInfo, format("%d top-level paths, %d paths in closure")
|
||||
% allowedPaths.size() % allowedPathsClosure.size());
|
||||
|
|
Loading…
Reference in a new issue