From 5357b1548a6814a57077ded3afae7dfb513ba0c9 Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Fri, 5 Jun 2015 17:01:59 -0400 Subject: [PATCH] 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 --- tools/broccoli/diffing-broccoli-plugin.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/broccoli/diffing-broccoli-plugin.ts b/tools/broccoli/diffing-broccoli-plugin.ts index 1c38d208bc..2006856a12 100644 --- a/tools/broccoli/diffing-broccoli-plugin.ts +++ b/tools/broccoli/diffing-broccoli-plugin.ts @@ -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"); }