Skip to content

Potential performance problem with MediaSessionManager#get/setMetadata #7087

@litetex

Description

@litetex

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

  • Android version/Custom ROM version: Android 11 - API 30
  • Device model: Android Emulator Pixel 3a/Pixel C

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue is related to a bugplayerIssues related to any player (main, popup and background)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions