这是indexloc提供的服务,不要输入任何密码
Skip to content

Blocked UI when using large playlists #81

@juliankotrba

Description

@juliankotrba

Issue

We are experiencing UI lags when using big playlists containing podcast urls. Specifically, we are using a MediaController where we usesetMediaItems to pass around 600 MediaItems. The Items are presented in a RecyclerView where users can select the desired item. After selecting an item by click, we call MediaController#seekToDefaultPosition. This call clearly freezes the UI and also makes everything unresponsive for a few milliseconds. We have not checked if the problems also occurs with big playlists of local audio files.

Reproduce

We successfully reproduced the issue in your session demo project by slightly modifying the following line

with

subItemMediaList.addAll(List(500) { children.get(0) })

As you can imagine, this code change only provokes a large playlist.

First select any audio file in the album, artist or genre folder. For example: Artist Folder -> The Kyoto Connection -> click on Intro - The Way ..

You should see the UI lag when you try to scroll in the list immediately after clicking an item in the bottom list view in the PlayerActivity.

We also found out that switching between two MediaItems which have been played before does not produces any lags. So maybe the UI issues are related to ongoing network calls.

For us, the UI lags are visible on the following phones, however, the bug is "better" visible on the Samsung S9:

  • Samsung S9 (Android 11)
  • OnePlus 6 (Android 11)

media3 Version: 1.0.0-alpha03

Please let us know if you have any further questions or if there is anything we can do to support you in finding the cause.
Thanks for building media3!

Julian

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions