-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Change player progress bar update from 500 ms to 1 s #7071
Conversation
Just like in the issue 7062, #7062, this doesn't affect UI as it updates every one second anyway, but reduces very heavy android widget progress bar high cpu usage. With every 500s there is 6% cpu usage and with 1s only 4%. However further changes will have to be made to disable updating of player progress bar when screen is off to further reduce power consumption. With this, total power savings would be 20% in mAh consumption.
Testing results are 0.0395 mAh / s versus 0.046 mAh / s without patch, so therefore with 500 ms the power consumption on Moto G4 with android 7 is 16% higher. Note this is done in controlled way the way that the player is started from scratch. After some time garbage collection usage due to progress bar widget string operations grows 2x but when changing playlist it reduces a bit but not to the minimum as with this test. Hence stopping progress update on screen off would really increase playback time a lot. |
Fun fact: And never got changed back... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
Do we want to inlcude this into 0.21.10? If yes, we need to change the target branch. |
@TobiGr I vote yes. |
can this be done with the "Rebase and merge" option? I didn't use it yet and don't want to break anything. |
@Redirion It's done via the |
@TobiGr don't PRs get merged into TeamNewPipe:dev not TeamNewPipe:release/0.21.10? |
generally: yes |
@thefalsedev Have you documented this anywhere? If not, please open a new issue with whatever you think is required (or reopen your linked issue if it already contains the relevant info). Edit: also, do you see the same power consumption stats with the pre-unified version? #4918 |
Just like in the issue #7062, this doesn't affect UI as it updates every one second anyway, but reduces very heavy android widget progress bar high cpu usage. With every 500 ms there is 6% cpu usage and with 1 s only 4%. However further changes will have to be made to disable updating of player progress bar when screen is off to further reduce power consumption. With this, total power savings would be 20% in mAh consumption in background playback. This pull request does approx 10% longer screen-off playback.
What is it?
Description of the changes in your PR
Change frequency of player progress bar update to 1s
Fixes the following issue(s)
Due diligence