Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core: ViewEventEmitter should not emit duplicate onLayout events
Summary: Simple hack to prevent duplicate onLayout events from being emitted to JS. Because of the addition of State Reconciliation to the Fabric lifecycle (see previous diff), in certain circumstances entire subtrees can be relayed-out many, many times even though they aren't changing. For JS product code that responds to every onLayout and forces a ReactJS tree commit (see: some usages of VirtualizedList) this can cause an async infinite loop of commits and layouts even though the tree and the LayoutMetrics aren't actually changing. Even though nothing is changing, it can still cause serious performance regressions and even some bugs since the internals of various state machines may assume onLayout won't be called many times. Changelog: [Internal] Reviewed By: shergin Differential Revision: D19715280 fbshipit-source-id: d879e24f1c7b1f710ad430b7473aa9293d093dea
- Loading branch information