Merge pull request #4683 from JaeHunRo/master

temporarily fixes printWasted abnormality
This commit is contained in:
Ben Alpert
2015-09-23 00:34:51 -07:00
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -156,6 +156,7 @@ var ReactDefaultPerf = {
writes: {},
displayNames: {},
totalTime: 0,
created: {},
});
start = performanceNow();
rv = func.apply(this, args);
@@ -228,6 +229,7 @@ var ReactDefaultPerf = {
if (isRender) {
addValue(entry.counts, rootNodeID, 1);
} else if (isMount) {
entry.created[rootNodeID] = true;
mountStack.push(0);
}
+4
View File
@@ -184,6 +184,10 @@ function getUnchangedComponents(measurement) {
break;
}
}
// check if component newly created
if (measurement.created[id]) {
isDirty = true;
}
if (!isDirty && measurement.counts[id] > 0) {
cleanComponents[id] = true;
}