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[]) {
|
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) {
|
if (this.treeDiffer) {
|
||||||
let diffResult = this.treeDiffer.diffTree();
|
return this.treeDiffer.diffTree();
|
||||||
diffResult.log(!firstRun);
|
|
||||||
return diffResult;
|
|
||||||
} else if (this.treeDiffers) {
|
} else if (this.treeDiffers) {
|
||||||
return this.treeDiffers.map((treeDiffer) => treeDiffer.diffTree())
|
return this.treeDiffers.map((treeDiffer) => treeDiffer.diffTree());
|
||||||
.map((diffResult) => {
|
|
||||||
diffResult.log(!firstRun);
|
|
||||||
return diffResult;
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
throw new Error("Missing TreeDiffer");
|
throw new Error("Missing TreeDiffer");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue