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 lib/customization: Improve callPackage error message for missing args 2022-04-01 22:03:05 +02:00
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 Fix a typo in the lib.foldr docstring 2022-08-20 23:58:57 +01:00
meta.nix lib/meta: add getExe to get the main program of a drv 2022-04-24 04:19:49 +03:00
minver.nix boostrap fetchurl: Add SRI support 2022-08-24 09:55:45 +02:00
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 lib.sourceTypes: simplify implementation 2022-05-30 16:27:34 +08:00
sources.nix lib/sources.nix: remove unused binding 2022-09-26 22:18:55 -04:00
strings-with-deps.nix
strings.nix lib/strings/toShellVars: handle derivations as strings 2022-05-07 17:01:51 +02:00
trivial.nix lib/trivial: Update oldestSupportedRelease 2022-07-04 20:07:44 +02:00
types.nix lib/types.nix: remove unused bindings 2022-09-26 22:18:55 -04:00
versions.nix
zip-int-bits.nix lib/zip-int-bits: fix typo: bitXOR -> bitXor 2022-06-09 20:04:37 +03:00