Skip to content

Commit

Permalink
Refactor layout effect methods (facebook#19895)
Browse files Browse the repository at this point in the history
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
Brian Vaughn authored and koto committed Jun 15, 2021
1 parent 052ccb7 commit 7642d35
Show file tree
Hide file tree
Showing 2 changed files with 487 additions and 372 deletions.
Loading

0 comments on commit 7642d35

Please sign in to comment.