lbry-desktop/ui
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
..
component URI parsing improvements (#207) 2021-11-02 12:37:53 -04:00
constants General-purpose "Confirm" modal 2021-10-29 13:36:27 +08:00
effects Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
modal General-purpose "Confirm" modal 2021-10-29 13:36:27 +08:00
page Fix 'secondary.js' code coverage 2021-11-01 15:25:40 +08:00
redux URI parsing improvements (#207) 2021-11-02 12:37:53 -04:00
scss Add hints if an error occurs subscribing to notifications (#143) 2021-11-01 14:51:23 -04:00
util URI parsing improvements (#207) 2021-11-02 12:37:53 -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