@samitouri / QOS-React-2 / commits / 6244a985c4

updates printWasted

JaeHunRo committed Sep 23, 2015 at 01:46 UTC 6244a985c4901dcc5e70f72da76a0bccf5e2b222
2 files changed +6
src/test/ReactDefaultPerf.js
+2
@@ -156,6 +156,7 @@ var ReactDefaultPerf = {
156 writes: {},
157 displayNames: {},
158 totalTime: 0,
159 + created: {},
160 });
161 start = performanceNow();
162 rv = func.apply(this, args);
@@ -228,6 +229,7 @@ var ReactDefaultPerf = {
229 if (isRender) {
230 addValue(entry.counts, rootNodeID, 1);
231 } else if (isMount) {
232 + entry.created[rootNodeID] = true;
233 mountStack.push(0);
234 }
235
src/test/ReactDefaultPerfAnalysis.js
+4
@@ -184,6 +184,10 @@ function getUnchangedComponents(measurement) {
184 break;
185 }
186 }
187 + // check if component newly created
188 + if (measurement.created[id]) {
189 + isDirty = true;
190 + }
191 if (!isDirty && measurement.counts[id] > 0) {
192 cleanComponents[id] = true;
193 }