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

Cache duration String to improve performance #2178

Merged
merged 3 commits into from
Mar 5, 2019
Merged

Cache duration String to improve performance #2178

merged 3 commits into from
Mar 5, 2019

Conversation

Redirion
Copy link
Member

@Redirion Redirion commented Mar 4, 2019

This pull requests intents to improve performance on Backgroundplayer while the screen is on.

In VideoPlayer the Duration String is cached effectively with the help of the playbackSeekBar(getMax() and setMax(). As the playbackSeekBar doesn't exist in BackgroundPlayer, using two additional variables will reduce performance impact of notification updates by almost 50% and thus perform similar to VideoPlayer.

This addresses issue #2170 and issue #1941.

In VideoPlayer the Duration String is cached effectively by setting it to the playbackSeekBar. As the playbackSeekBar doesn't exist in BackgroundPlayer, using two addition variables will reduce performance impact of notification updates by almost 50% and thus perform similar to VideoPlayer.

This addresses issue #2170
Copy link
Contributor

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

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

Thanks!

@TobiGr TobiGr merged commit 1d4e4eb into TeamNewPipe:dev Mar 5, 2019
@Redirion Redirion deleted the patch-1 branch March 5, 2019 20:12
This was referenced Apr 28, 2019
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