diff options
author | Guillaume Bouchard <guillaum.bouchard@gmail.com> | 2022-10-04 12:09:35 +0200 |
---|---|---|
committer | Guillaume Bouchard <guillaum.bouchard@gmail.com> | 2022-10-07 18:03:42 +0200 |
commit | 98715e1b1acda26f0cd86dc2b74abd1672af8644 (patch) | |
tree | cd6ad53b61e16edf59b91c873d9bc1e62328f890 /pkgs/development/haskell-modules/hoogle.nix | |
parent | f3500ee0293e230bc06b6636f5fa012cfbff5f81 (diff) |
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.
Diffstat (limited to 'pkgs/development/haskell-modules/hoogle.nix')
-rw-r--r-- | pkgs/development/haskell-modules/hoogle.nix | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/pkgs/development/haskell-modules/hoogle.nix b/pkgs/development/haskell-modules/hoogle.nix index 4c8bf8c2d2824..b5be7edb6e5a9 100644 --- a/pkgs/development/haskell-modules/hoogle.nix +++ b/pkgs/development/haskell-modules/hoogle.nix @@ -36,7 +36,6 @@ let This index includes documentation for many Haskell modules. ''; - # TODO: closePropagation is deprecated; replace docPackages = lib.closePropagation # we grab the doc outputs (map (lib.getOutput "doc") packages); |