Skip to content

Conversation

@naveensingh
Copy link
Contributor

This PR resolves some of the problems mentioned in #604

Major changes:

  • Only set mediaId on media items on the controller side and inflate as needed in the service
  • Update media3 to 1.2.0-alpha02 (includes some fixes)
  • Ensure we are loading media in a separate background thread instead of on the player thread.
  • Implement lazy seek to next/previous media item behavior to avoid doing too much work on large playlists.
  • Improve tracks recycler view when there are large items in the list

Related issues:

Tested playing ~4-5k items on a queue on a device with average specs and it worked pretty well. Large playlists kept getting slower and slower, 10k items are still not usable on below-average devices.

The previous ConstraintLayout + RelativeLayout + double nested ConstraintLayouts for each item was too slow and led to laggy scroll experience.
This makes the media controller more responsive, see androidx/media#81
It's costly for large playlists
@tibbi
Copy link
Contributor

tibbi commented Oct 15, 2023

should be good, will do more testing in the real app. Thanks

@tibbi tibbi merged commit 96c5bdf into SimpleMobileTools:master Oct 15, 2023
@naveensingh naveensingh deleted the performance_improvements branch October 16, 2023 00:39
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