dillon1000/react
Commit
Browse files Fix a few GC leaks in events system
Summary:
- Weren't pooling the Transaction in the batching strategy
- Creating a new closure for every event tick due to batchedUpdates()
- EnterLeaveEventPlugin creates a new array on each event.
I wonder if there is more optimization opportunity in accumulate(). Squinting at the fps graph this seems to be faster and waste less memory but it's hard to conclusively tell. I did verify that these were all hotspots though.Changed paths4 files
First-parent comparisonsrc/core/ReactDefaultBatchingStrategy.js ModifiedM src/core/ReactEventEmitterMixin.js ModifiedM src/core/ReactUpdates.js ModifiedM src/eventPlugins/EnterLeaveEventPlugin.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…