lbry-desktop/ui/redux/reducers
infinite-persistence c97cab0ebb
byId[] fixes to reduce invalidation (#239)
* Don't update 'pendingById' if no changes.

'pendingById' isn't frequently updated, but using it as a proof-of-concept to fix how reducers should be written to avoid unnecessary updates.

ImmutableJS apparently does all of this for us, but there are cons to using it as well, so using own wrappers for now.

* Don't update 'byId' if no changes + add 'selectClaimWithId'

## Ticket
116 Claim store optimization ideas (reducing unnecessary renders)

## Changes
- Ignore things like `confirmations` so that already-fetched claims aren't invalidated and causes re-rendering. The `stringify` might look expensive, but the amount of avoided re-renders outweighs it. There might be faster ways to compare, though.

- With `byId[claimId]` references more stable now, memoized selectors can now use 'selectClaimWithId' to pick a specific claim to depend on, instead of 'byId' which changes on every update.

* Fix memo: selectMyChannelClaims, selectActiveChannelClaim

## Issue
These should never recalculate after `channel_list` has been fetched, but they do because of poor selector dependency.

## Change
With the `byId` changes from the previous commit, we are now able to memoize these selectors correctly.
2021-11-08 12:25:29 -05:00
..
app.js ChunkLoadError: ask user to reload instead of automatically reloading (#139) 2021-10-27 11:07:06 -04:00
blocked.js Skip muted list update if no change 2021-10-19 21:15:26 +08:00
claims.js byId[] fixes to reduce invalidation (#239) 2021-11-08 12:25:29 -05:00
coinSwap.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
collections.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
comments.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
content.js recsys v0.2 (#6977) 2021-09-02 18:39:40 -04:00
file_info.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
livestream.js Livestream category improvements (#7115) 2021-09-24 10:26:21 -04:00
notifications.js fetch notofication/categories for notification types dropdown 2021-04-30 12:45:46 -04:00
publish.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
reactions.js add file reactions code from odysee 2020-10-02 15:28:00 -04:00
reportContent.js Add 'ReportContent' actions/reducers/selectors 2021-04-21 10:49:31 -04:00
rewards.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
search.js send recsys powered-by (#6875) 2021-08-17 10:03:25 -04:00
settings.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
subscriptions.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
sync.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
tags.js Optimize tags and followedTags 2021-10-20 11:29:16 +08:00
user.js Clear 'passwordSet*' flags too in USER_PASSWORD_SET_CLEAR 2020-09-15 12:52:12 -04:00
wallet.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00