Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance for some updateState calls (local lists) #4891

Merged
merged 2 commits into from
Nov 20, 2020

Conversation

vkay94
Copy link
Contributor

@vkay94 vkay94 commented Nov 15, 2020

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

This PR improves the binding for local list items (in playlist details and history) which require the progress time from streams (red indicator) by adding the field progressTime to some classes. The field is retrieved directly from the database and doesn't need to be fetched later (which blocked the UI by calling blockingGet).

With this change it is also easier to compare the items for changes more efficient when the lists are calculated asynchronously sometime in the future (e.g. through ListAdapter or Groupie).

APK testing

app-debug.zip

Due diligence

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this and it works as expected. Thank you for looking into it, it should improve list performance while having no tradeoff. Thank you :-D

@Stypox Stypox merged commit 7217703 into TeamNewPipe:dev Nov 20, 2020
@vkay94
Copy link
Contributor Author

vkay94 commented Nov 20, 2020

Yeah, there shouldn't be a case where it would result in unexpected loading updating. All lists using these entries with the progress bar are loaded as whole in handleResult, so there isn't any specific update for single items (at least I didn't found any :') )

@vkay94 vkay94 deleted the locallist-entry-progressTime branch December 2, 2020 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants