diff options
author | Rebecca Turner <me@re-becca.org> | 2015-06-17 05:32:57 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-06-26 03:27:19 +0300 |
commit | 00c15901f8bfb0d2cda6fbfafa85ad7aba5e1cd0 (patch) | |
tree | 287b3255fdb36dff8e8f13703a81967d020bdb75 /lib/dedupe.js | |
parent | 404cbab4908bf41501ad7f9d7c7a28b6aca23056 (diff) |
dedupe: Only clone + load-extraneous
When idealizing the tree for dedupe, only clone and load-extraneous
Diffstat (limited to 'lib/dedupe.js')
-rw-r--r-- | lib/dedupe.js | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/lib/dedupe.js b/lib/dedupe.js index cfec9e1b4..28d1b12b9 100644 --- a/lib/dedupe.js +++ b/lib/dedupe.js @@ -54,22 +54,39 @@ Deduper.prototype.normalizeTree = function (log, cb) { Installer.prototype.normalizeTree.call(this, log, cb) } -Deduper.prototype.loadAllDepsIntoIdealTree = function (cb) { +Deduper.prototype.loadIdealTree = function (cb) { validate('F', arguments) - log.silly('dedupe', 'loadAllDepsIntoIdealTree') - var cg = this.progress.loadAllDepsIntoIdealTree - loadExtraneous(this.idealTree, cg.newGroup('loadExtraneous'), cb) + log.silly('install', 'loadIdealTree') + + var self = this + chain([ + [this.newTracker(this.progress.loadIdealTree, 'cloneCurrentTree')], + [this, this.cloneCurrentTreeToIdealTree], + [this, this.finishTracker, 'cloneCurrentTree'], + + [this.newTracker(this.progress.loadIdealTree, 'loadAllDepsIntoIdealTree', 10)], + [function (next) { + loadExtraneous(self.idealTree, self.progress.loadAllDepsIntoIdealTree, next) + }], + [this, this.finishTracker, 'loadAllDepsIntoIdealTree'], + + [this, function (next) { recalculateMetadata(this.idealTree, log, next) } ], + ], cb) } Deduper.prototype.generateActionsToTake = function (cb) { validate('F', arguments) log.silly('dedupe', 'generateActionsToTake') chain([ + [this.newTracker(log, 'hoist', 1)], [hoistChildren, this.idealTree, this.differences], + [this, this.finishTracker, 'hoist'], + [this.newTracker(log, 'sort-actions', 1)], [this, function (next) { this.differences = sortActions(this.differences) next() }], + [this, this.finishTracker, 'sort-actions'], [filterInvalidActions, this.where, this.differences], [checkPermissions, this.differences], [decomposeActions, this.differences, this.todo] |