-
-
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
Potential performance problem with MediaSessionManager#get/setMetadata #7087
Comments
For the performance of this method I wonder if this is not an issue of inspecting the performance on the debug build. Did you also try to check how the performance is, without all the Logs? edit: getThumbnail is never null. So don't mind the pre edited part. while looking at setMetaData I noticed another issue:
in other words, if showThumbnail is false, metaData updates do never happen! I will create a PR for that. |
@litetex can you check your logcat: does "setMetadata: N_Metadata update" appear every 1 seconds? that would be a bug. Please try my PR in comparison. Do you have "Show thumbnails" set to "off"? |
Okay I tested the stuff a bit and found out that the metadata updates - that are done every second - are completely useless. |
yes, and that's how it works / should work. When I was testing my PR, it was working this way. |
@Redirion |
Checklist
Steps to reproduce the bug
Run the app / play a video (in the background).
What I did:
Opened a video and ran it in the background.
Details
NewPipe performs a progress update when the player is active every 500ms/1s (was increased to 1s in #7071).
However when this progress update is executed the
setMetadata
-method seems to be very costly (takes 40-80% of the time of the complete progress update) as seen when profiling the app:Emulator Pixel 3a
cpu-emulator-Pixel3a.zip
Emulator Pixel C
cpu-emulator-PixelC.zip
Note: I'm unable to determine if this is just a android emulator problem as I can't profile my real phone (crashes with SIGSEV in HeapTaskDaemon/libc when running the profiler)
Device info
The text was updated successfully, but these errors were encountered: