Commit ce4245e
Performance: avoid triggering map deopt in V8 (facebook#28569)
The shape of the objects changed by this PR are both created in 2
locations with 2 different shapes, which most JS engines won't like.
I've noticed this in particular in V8 while benchmarking production
code.
https://github.com/facebook/react/blob/1293047d6063f3508af15e68cca916660ded791e/packages/react-reconciler/src/ReactFiberCacheComponent.js#L66-L77
https://github.com/facebook/react/blob/1293047d6063f3508af15e68cca916660ded791e/packages/react-reconciler/src/ReactFiberHostContext.js#L47-L54
https://github.com/facebook/react/blob/1293047d6063f3508af15e68cca916660ded791e/packages/react-reconciler/src/ReactFiberHooks.js#L3530-L3531
https://github.com/facebook/react/blob/1293047d6063f3508af15e68cca916660ded791e/packages/react-reconciler/src/ReactFiberHooks.js#L3492-L34931 parent c44070a commit ce4245e
File tree
2 files changed
+3
-3
lines changed- packages/react-reconciler/src
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3489 | 3489 | | |
3490 | 3490 | | |
3491 | 3491 | | |
3492 | | - | |
3493 | 3492 | | |
| 3493 | + | |
3494 | 3494 | | |
3495 | 3495 | | |
3496 | 3496 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
53 | | - | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
0 commit comments