Commit 95cf715
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 commit 6b90976.1 parent 32f13ee commit 95cf715
File tree
13 files changed
+19
-19
lines changed- compiled-rn/facebook-fbsource/xplat/js
- RKJSModules/vendor
- react-test-renderer/cjs
- react/cjs
- react-native-github/Libraries/Renderer
- implementations
13 files changed
+19
-19
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23752 | 23752 | | |
23753 | 23753 | | |
23754 | 23754 | | |
23755 | | - | |
| 23755 | + | |
23756 | 23756 | | |
23757 | 23757 | | |
23758 | 23758 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8610 | 8610 | | |
8611 | 8611 | | |
8612 | 8612 | | |
8613 | | - | |
| 8613 | + | |
8614 | 8614 | | |
8615 | 8615 | | |
8616 | 8616 | | |
| |||
8641 | 8641 | | |
8642 | 8642 | | |
8643 | 8643 | | |
8644 | | - | |
| 8644 | + | |
8645 | 8645 | | |
8646 | 8646 | | |
8647 | 8647 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9036 | 9036 | | |
9037 | 9037 | | |
9038 | 9038 | | |
9039 | | - | |
| 9039 | + | |
9040 | 9040 | | |
9041 | 9041 | | |
9042 | 9042 | | |
| |||
9067 | 9067 | | |
9068 | 9068 | | |
9069 | 9069 | | |
9070 | | - | |
| 9070 | + | |
9071 | 9071 | | |
9072 | 9072 | | |
9073 | 9073 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
| 642 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | | - | |
| 645 | + | |
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27059 | 27059 | | |
27060 | 27060 | | |
27061 | 27061 | | |
27062 | | - | |
| 27062 | + | |
27063 | 27063 | | |
27064 | 27064 | | |
27065 | 27065 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9479 | 9479 | | |
9480 | 9480 | | |
9481 | 9481 | | |
9482 | | - | |
| 9482 | + | |
9483 | 9483 | | |
9484 | 9484 | | |
9485 | 9485 | | |
| |||
9521 | 9521 | | |
9522 | 9522 | | |
9523 | 9523 | | |
9524 | | - | |
| 9524 | + | |
9525 | 9525 | | |
9526 | 9526 | | |
9527 | 9527 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10188 | 10188 | | |
10189 | 10189 | | |
10190 | 10190 | | |
10191 | | - | |
| 10191 | + | |
10192 | 10192 | | |
10193 | 10193 | | |
10194 | 10194 | | |
| |||
10243 | 10243 | | |
10244 | 10244 | | |
10245 | 10245 | | |
10246 | | - | |
| 10246 | + | |
10247 | 10247 | | |
10248 | 10248 | | |
10249 | 10249 | | |
| |||
0 commit comments