Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor layout effect methods (facebook#19895)
Commit phase durations (layout and passive) are stored on the nearest (ancestor) Profiler and bubble up during the commit phase. This bubbling used to be implemented by traversing the return path each time we finished working on a Profiler to find the next nearest Profiler. This commit removes that traversal. Instead, we maintain a stack of nearest Profiler ancestor while recursing the tree. This stack is maintained in the work loop (since that's where the recursive functions are) and so bubbling of durations has also been moved from commit-work to the work loop. This PR also refactors the methods used to recurse and apply effects in preparation for the new Offscreen component type.
- Loading branch information