3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/lib
Guillaume Bouchard 98715e1b1a lib.closePropagation: Remove the quadratic behavior in lib.closePropagation
The code of `lib.closePropagation` was internally using a
recursion on the dependencies and returns all the derivation directly or
indirectly referenced by buildInputs.

`lib.closeProgation` is implemented in pure nix and uses an unique
function for list which is quadratic and does "true" equality, which
needs deep set comparison.

Instead, we use the `builtins.genericClosure` which is implemented as a
builtin and uses a more efficient sorting feature.

Note that `genericClosure` needs a `key` to discriminate the values, we
used the `outPath` which is unique and orderable.

On benchmarks, it performs up to 15x time faster on a benchmark related
to haskellPackages.ghcWithPackages.
2022-10-07 18:03:42 +02:00
..
systems lib/systems/default.nix: add efiArch suffixes 2022-09-29 08:02:35 +00:00
tests Merge pull request #193132 from figsoda/clean-up 2022-10-01 17:03:11 -04:00
asserts.nix
attrsets.nix unionOfDisjoint: use builtins.intersectAttrs 2022-09-25 00:09:15 -07:00
cli.nix
customisation.nix
debug.nix
default.nix lib: Add lazyDerivation 2022-09-21 10:55:07 +01:00
deprecated.nix lib.closePropagation: Remove the quadratic behavior in lib.closePropagation 2022-10-07 18:03:42 +02:00
derivations.nix lib: Add lazyDerivation 2022-09-21 10:55:07 +01:00
fetchers.nix
filesystem.nix
fixed-points.nix
flake.nix
generators.nix lib.generators: simplify toYAML 2022-09-28 16:34:55 -04:00
kernel.nix
licenses.nix Merge pull request #188265 from steveeJ-forks/pr-holochain-launcher-bin 2022-10-03 21:12:51 +02:00
lists.nix
meta.nix
minver.nix
modules.nix Merge pull request #193132 from figsoda/clean-up 2022-10-01 17:03:11 -04:00
options.nix lib/options.nix: remove unused binding 2022-09-26 22:18:55 -04:00
source-types.nix
sources.nix lib/sources.nix: remove unused binding 2022-09-26 22:18:55 -04:00
strings-with-deps.nix
strings.nix
trivial.nix
types.nix lib/types.nix: remove unused bindings 2022-09-26 22:18:55 -04:00
versions.nix
zip-int-bits.nix