Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: ## What? The current approach for mount requires all render units to update their binders and defer skipping of content binding to their individual binders. This is not only time consuming but also inefficient and wasteful memory wise as we cache dummy evaluation results for all mount signals (extensions and mount binders). To make mount more efficient, we must be able to skip updates for render units that do not have any transitive signal dependencies. ## How? We extend `MountState` and track invocations of the major mount operations: - initial mount - updates - unmounts Tracking the first two operations gives us the opportunity to figure the set of render units that access signals so that we limit future updates to them. Tracking the last operation allows us to trim the tracked render units as needed. Doing all of these makes updates faster because we skip a good portion of the tree on updates and only restrict updates to render units that access signals which have changed or render units that have new binders or are affected by changed layout data. It also helps that the dependency tree for render units is shallow too so we spend less time on updates. Reviewed By: rooju Differential Revision: D62671753 fbshipit-source-id: 7edf36c40d66371e476d9b7e15a7fc84dc57f4f0
- Loading branch information