Skip to content

Commit 5357b15

Browse files
committed
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 angular#2378
1 parent 928ec1c commit 5357b15

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

tools/broccoli/diffing-broccoli-plugin.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,13 @@ class DiffingPluginWrapper implements BroccoliTree {
6464

6565

6666
private calculateDiff(firstRun: boolean): (DiffResult | DiffResult[]) {
67+
// TODO(caitp): optionally log trees based on environment variable or
68+
// command line option. It may be worth logging for trees where elapsed
69+
// time exceeds some threshold, like 10ms.
6770
if (this.treeDiffer) {
68-
let diffResult = this.treeDiffer.diffTree();
69-
diffResult.log(!firstRun);
70-
return diffResult;
71+
return this.treeDiffer.diffTree();
7172
} else if (this.treeDiffers) {
72-
return this.treeDiffers.map((treeDiffer) => treeDiffer.diffTree())
73-
.map((diffResult) => {
74-
diffResult.log(!firstRun);
75-
return diffResult;
76-
});
73+
return this.treeDiffers.map((treeDiffer) => treeDiffer.diffTree());
7774
} else {
7875
throw new Error("Missing TreeDiffer");
7976
}

0 commit comments

Comments
 (0)