nixpkgs/pkgs/build-support
Russell O'Connor 94c6af494a Exponentially reduce computation time needed for replace-dependency by using memoization.
This patch makes two changes.

(1) It memoizes the computation of dependsOnOld.
(2) It replaces rewrittenDerivations with a similar memoized table rewriteMemo.

This prevents the entire tree of run-time dependencies from being traversed and instead only traverses the graph of run-time dependencies.
In the case of deep dependency changes (such as changing one's bash version for an entire NixOS system) this can lead to an exponential speedup in processing time
because shared dependencies are no longer traversed multiple times.

This patch isn't quite derivation-per-derivation equivalent to the original computation.
There are two immaterial differences.

(1) The previous version would always call upon sed to replace oldDependency with newDependency even when the store object being updated doesn't directly depend on
oldDependency.
The new version only replaceds oldDependency with newDependency when the store object being updated actually directly depends on oldDependency (which means there is
actually a hash to replace).
(2) The previous version would list the old store object as a source input of the new store object, *except* for the root derivation being updated.  Because the
root derivation being updated has its actual derivation avaiable the previous verions would make the updated root derivation depend on the old derivation as a
derivation input instead of a source input.
The new version always lists the old store object as a source input, including the root derivation.
2014-09-28 09:39:39 -04:00
..
agda Add a builder for Agda packages. 2014-09-01 01:05:48 +01:00
build-fhs-chrootenv build-fhs-chrootenv: bind mount chroots /tmp to hosts /tmp 2014-09-09 12:10:54 +02:00
buildenv buildEnv to support passthru 2014-07-10 16:41:02 +02:00
builder-defs
cabal cabal: enable multi-threaded builds with GHC 7.8.x or later 2014-08-17 00:20:12 +02:00
clang-wrapper Partially merge gcc-wrapper and clang-wrapper 2014-07-02 20:10:40 +02:00
dotnetenv
fetchbower
fetchbzr build-support: Fix nix-prefetch-* on OS X. 2014-08-27 11:22:34 +02:00
fetchcvs build-support: Fix nix-prefetch-* on OS X. 2014-08-27 11:22:34 +02:00
fetchdarcs fetchbzr, fetchdarcs, fetchhg: use rev attr 2014-06-28 21:06:10 +02:00
fetchfile
fetchgit Allow git checkouts to have custom name 2014-09-03 21:54:25 +04:00
fetchgitrevision
fetchhg build-support: Fix nix-prefetch-* on OS X. 2014-08-27 11:22:34 +02:00
fetchmtn
fetchpatch Merge #2630: add and use fetchpatch 2014-05-17 07:31:03 +02:00
fetchsvn build-support: Fix nix-prefetch-* on OS X. 2014-08-27 11:22:34 +02:00
fetchsvnrevision
fetchsvnssh
fetchurl Add http mirror for postgresql. 2014-08-14 19:17:26 +02:00
fetchzip require gnused for all prefetch scripts 2014-06-23 01:25:40 -04:00
gcc-cross-wrapper
gcc-wrapper ld-wrapper: Put back the --sysroot filter 2014-09-02 13:18:03 +02:00
grsecurity grsecurity: Update stable and test patches 2014-09-08 15:16:38 +02:00
kdewrapper Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
kernel Document paths-from-graph.pl somewhat. 2014-06-28 20:44:22 -05:00
libredirect hipchat: Fix access to /usr/share/X11/xkb 2014-05-27 01:06:54 +02:00
make-desktopitem
make-startupitem Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
make-symlinks
mono-dll-fixer
native-darwin-cctools-wrapper
nuke-references
release Make ant-build canonicalize the jars it produces so that we produce byte-for-byte identical jars (they normally contain timestamps and nondeterministic ordering of metadata lines) 2014-08-14 01:20:44 -04:00
setup-hooks Revert "python-wrapper: fix wrapped argv[0] w/o sed, maybe" 2014-09-02 20:45:41 +04:00
src-only
substitute
upstream-updater More support for SF.net in auto-updater 2014-09-02 14:25:16 +04:00
vm Remove references to <nixpkgs> 2014-09-23 15:48:15 +02:00
vsenv
build-pecl.nix Simplify php-packages.nix 2014-07-03 11:01:19 -04:00
replace-dependency.nix Exponentially reduce computation time needed for replace-dependency by using memoization. 2014-09-28 09:39:39 -04:00
source-from-head-fun.nix
trivial-builders.nix