-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Allow
createSelector
to store a cache
`createSelector` has a big problem: it invalidates its cache way too frequently. It does this whenever dependants change, but it's not comparing those dependants against the called parameters - it's applying them "globally" within the selector such that even when the underlying data in `state` is the same, because the selector was invoked with different parameters it generates different dependants and thinks things are different. This change caches the dependants per cache key so we don't need to clear so often. This introduces memory bloat because we're storing those cached values throughout the session.
- Loading branch information
Showing
2 changed files
with
17 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters