Skip to content

Commit bdb1083

Browse files
committed
Use already extracted values instead of reading off props for controlled components (#26596)
Since `props.x` is a possibly megamorphic access, it can be slow to access and trigger recompilation. When we are looping over the props and pattern matching every key, anyway, we've already done this work. We can just reuse the same value by stashing it outside the loop in the stack. This only makes sense for updates in diffInCommitPhase since otherwise we don't have the full set of props in that loop. We also have to be careful not to skip over equal values since we need to extract them anyway. DiffTrain build for [6b90976](6b90976)
1 parent fa65896 commit bdb1083

15 files changed

+4736
-3252
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
343a45ffa48065e60699bbe68f82d7b62fa02840
1+
6b90976bc10f325146b193286435a4b5015ef605

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-www-modern-6befcd4c";
30+
var ReactVersion = "18.3.0-www-modern-54376ec8";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
6969
return self;
7070
}
7171

72-
var ReactVersion = "18.3.0-www-classic-23097578";
72+
var ReactVersion = "18.3.0-www-classic-d940bd0e";
7373

7474
var LegacyRoot = 0;
7575
var ConcurrentRoot = 1;

compiled/facebook-www/ReactART-prod.modern.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9675,7 +9675,7 @@ var slice = Array.prototype.slice,
96759675
return null;
96769676
},
96779677
bundleType: 0,
9678-
version: "18.3.0-www-modern-a2dd0337",
9678+
version: "18.3.0-www-modern-fd0cee51",
96799679
rendererPackageName: "react-art"
96809680
};
96819681
var internals$jscomp$inline_1309 = {
@@ -9706,7 +9706,7 @@ var internals$jscomp$inline_1309 = {
97069706
scheduleRoot: null,
97079707
setRefreshHandler: null,
97089708
getCurrentFiber: null,
9709-
reconcilerVersion: "18.3.0-www-modern-a2dd0337"
9709+
reconcilerVersion: "18.3.0-www-modern-fd0cee51"
97109710
};
97119711
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
97129712
var hook$jscomp$inline_1310 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

0 commit comments

Comments
 (0)