lbry-desktop/ui/redux/selectors
infinite-persistence bf0aac2339
URI parsing improvements (#207)
* Prevent multiple parseURI calls

## Ticket
129

## Issue
Code was shortened to use `isURIValid` during the consolidation. `isURIValid` calls `normalizeURI`, which calls another `parseURI`.

`parseURI` is pretty expensive.

## Approach
- Add optional parameter to `isURIValid` to skip the normalization.
- Set those that were converted during the consolidation to skip the normalization. Also covered a few other instances where it is obvious to me that normalization is not required.
- For the rest, I can't tell for sure if it's safe to remove the normalization, so the default `normalize=true` will leave things as is.

The whole `parseURI` probably needs a refactoring, or a few lighter version for specific needs.

* Simplify isURIEqual

## Issue
`parseURI` is too expensive to be used in a loop, plus `normalizeURI` itself is calling `parseURI`.

## Approach
Not sure if it covers all cases, but just try convert colons to hashes before comparing.
2021-11-02 12:37:53 -04: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 URI parsing improvements (#207) 2021-11-02 12:37:53 -04:00
coinSwap.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
collections.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
comments.js Handle re-reselect warning on null/undefined key 2021-10-25 13:26:10 +08:00
content.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
file_info.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
livestream.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
notifications.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
publish.js Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
reactions.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
reportContent.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
rewards.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
search.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
settings.js Revert "Code-split homepages" 2021-10-28 01:33:46 +08:00
subscriptions.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
sync.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
tags.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
user.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
wallet.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00