1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 05:00:16 +00:00
nixpkgs/pkgs
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
..
applications Windowmaker: update to 0.95.6 2014-09-27 17:23:38 -03:00
build-support Exponentially reduce computation time needed for replace-dependency by using memoization. 2014-09-28 09:39:39 -04:00
data Revert "Revert "tzdata: bump to 2014g."" 2014-09-24 20:50:34 +01:00
desktops kde-4.14: fix kactivities download 2014-09-27 18:16:26 +02:00
development agda-iowa-stdlib: renamed from aaron-stump-stdlib 2014-09-28 02:21:21 +01:00
games OpenTTD: Update to 1.4.3. 2014-09-25 13:53:49 +02:00
misc fixed some meta.maintainers attributes 2014-09-26 23:44:29 +02:00
os-specific iproute: Fix regressions introduced in 3.16.0 2014-09-26 00:45:38 -07:00
servers apache-httpd: Update to 2.2.29 2014-09-24 21:04:24 +02:00
shells bash: Fix for CVE-2014-7169 2014-09-25 14:40:44 +02:00
stdenv
test s/dependancy/dependency/ 2014-09-10 00:28:49 +01:00
tools New package: tty-clock-0.1 2014-09-28 13:05:58 +02:00
top-level Merge pull request #4302 from k0ral/tty-clock 2014-09-28 13:10:55 +02:00