lbry-desktop/ui
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
..
component Allow moderators to delete comment (#235) 2021-11-08 12:22:40 -05:00
constants improve playlists display (#232) 2021-11-05 21:00:27 -04:00
effects Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
modal Allow moderators to delete comment (#235) 2021-11-08 12:22:40 -05:00
page Use 'selectHasChannel' instead of the full 'selectMyChannelClaims' 2021-11-08 15:02:44 +08:00
redux byId[] fixes to reduce invalidation (#239) 2021-11-08 12:25:29 -05:00
scss Fixes the play/pause on drag issue with the floating player. (#221) 2021-11-08 12:51:03 +01:00
util Stickers/emojis fall out / improvements (#220) 2021-11-05 15:31:51 -04:00
analytics.js Track duration of startup events 2021-10-22 16:02:21 +08:00
app.js refactor lbrytv web server 2019-11-11 13:27:29 -05:00
comments.js Comment Moderation - time based bans 2021-09-03 07:17:56 +08:00
i18n.js Revert "Simplify language lists" 2021-04-06 15:42:27 -04:00
index.jsx Defer blocklists slightly to not block me 2021-10-22 17:31:39 +08:00
lbry.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
logWarningConsoleMessage.js new lbc icon 2020-09-29 17:12:32 -04:00
native.js working 2020-12-16 10:52:22 -05:00
reducers.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
rewards.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
store.js Additional GA events via redux/lbryio hook 2021-10-22 10:56:43 +08:00