chore(broccoli): disable logging in DiffingBroccoliPlugin
It is very noisy, especially when multiple trees are used. Since the tree differ is fairly quick, it's not measuring the real costs of a plugin anyhow. Closes #2378
This commit is contained in:
parent
928ec1c5f8
commit
5357b1548a
|
@ -64,16 +64,13 @@ class DiffingPluginWrapper implements BroccoliTree {
|
|||
|
||||
|
||||
private calculateDiff(firstRun: boolean): (DiffResult | DiffResult[]) {
|
||||
// TODO(caitp): optionally log trees based on environment variable or
|
||||
// command line option. It may be worth logging for trees where elapsed
|
||||
// time exceeds some threshold, like 10ms.
|
||||
if (this.treeDiffer) {
|
||||
let diffResult = this.treeDiffer.diffTree();
|
||||
diffResult.log(!firstRun);
|
||||
return diffResult;
|
||||
return this.treeDiffer.diffTree();
|
||||
} else if (this.treeDiffers) {
|
||||
return this.treeDiffers.map((treeDiffer) => treeDiffer.diffTree())
|
||||
.map((diffResult) => {
|
||||
diffResult.log(!firstRun);
|
||||
return diffResult;
|
||||
});
|
||||
return this.treeDiffers.map((treeDiffer) => treeDiffer.diffTree());
|
||||
} else {
|
||||
throw new Error("Missing TreeDiffer");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue