Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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-L3493
- Loading branch information