Open
Description
This
computeFSClosure
call is very inefficient, because
it is called for each
.drv
in the closure (e.g. over 4000 times in my case)
it recomputes the whole closure, because the second parameter is only written to.computeFSClosure
/computeClosure
should probably not assume that the closure property holds for thisres
set; that seems riskyIt seems to lead to O(n²) cost.
Perhaps these paths could be gathered up in a set, and then run
computeFSClosure
on that set?It is very tempting to just set
includeOutputs = true
, and be done with it, but that would silently ignore missing outputs, which could lead to a build impurity if not checked.To reproduce with Nixpkgs,
nix-build -A nixosTests.nixos-rebuild-target-host
I'll open an issue.
Originally posted in 2897286