dillon1000/react

Commit

Fix DEV performance regression by avoiding Object.assign on Fibers (#12510)

* Fix DEV performance regression by avoiding Object.assign on Fibers

* Reduce allocations in hot path by reusing the stash

Since performUnitOfWork() is not reentrant, it should be safe to reuse the same stash every time instead of creating a new object.
Browse files
Changed paths3 files
First-parent comparison
M packages/react-reconciler/src/ReactFiber.js ModifiedM packages/react-reconciler/src/ReactFiberScheduler.js ModifiedA packages/react-reconciler/src/__tests__/ReactIncrementalErrorReplay-test.internal.js Added
Patch

Files changed

Rendering syntax-highlighted changes…