lbryio / lbry-desktop

A browser and wallet for LBRY, the decentralized, user-controlled content marketplace.
https://lbry.tech
MIT License
3.56k stars 415 forks source link

claim search runs twice sometimes and "refreshes" view #5979

Open tzarebczan opened 3 years ago

tzarebczan commented 3 years ago

Been noticing this on the homepage and channel pages, but maybe happening on others too. This is on a refresh of the channel page: image

So after page load, you'll see a flicker and it reloads again.

There's also a bug where if you scroll down to page 2 and back to page 1, then page 2 is shown on top. (not sure if related, but might be).

tzarebczan commented 3 years ago

This happens after the block list is loaded. Should only happen on refresh/first load.

tzarebczan commented 3 years ago

Other improvements here include:

infinite-persistence commented 3 years ago

Only call for first channel? All channels should have the same block lists outside of a small percentage where accounts are merged + channels come from different wallets. We can eventually get them back in sync via some other tools on blocked/muted page.

The culprit seems to be channel_list consistently taking too long to return. doFetchModBlockList needs that data to proceed; meanwhile, the frontpage tiles are already resolved.

Any way to speed up channel_list

Side note: given the current spammer mitigation, we can't just check the first channel -- we would have check until the first successful response.


I'm experimenting with ClaimTileDiscover using existing uris while waiting for doClaimSearch results. At the expense of memory (stashing the uris), it seems to work ok:

Even if we end up fixing channel_list to be faster, this would still be useful to reduce redraws. Will test further.