Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More memoization in useFragmentInternal
Summary: Adds some extra memoization in useFragmentInternal() to reduce work in the common case. Specifically, by memoizing the selector we ensure that the `areEqualSelectors()` call can hit the fast path, quickly bailing out when the inputs are `===`. This also avoids unnecessarily running effects related to missing client edges (a further optimization would be to use static knowledge of the fragment to avoid running effects *at all* if we know the fragment can never have client edges). Reviewed By: voideanvalue Differential Revision: D36649352 fbshipit-source-id: 8ae7801a3d2644b2de162985dc650739731e18aa
- Loading branch information