Skip to content

Issue600 - Slow loading of long playlists#627

Merged
eddyizm merged 6 commits into
eddyizm:developmentfrom
arrillodotcom:issue600
May 16, 2026
Merged

Issue600 - Slow loading of long playlists#627
eddyizm merged 6 commits into
eddyizm:developmentfrom
arrillodotcom:issue600

Conversation

@arrillodev
Copy link
Copy Markdown

@arrillodev arrillodev commented May 5, 2026

This commit is the minimal changes I could make to start playing sooner when loading from a playlist by queuing a maximum of 10, then loading all the other media files separately, once something is playing. This mainly meant rewriting the startQueue function.

There was slight modification to enqueue also so that it collects the media metadata off the main thread and doesn't block the UI.

I left in the comments so you can see my reasoning but happy to remove if you prefer.

This reduced the start time for my 500 song playlist from 7 seconds to less than 1 second.

The only functional change is that previously playlists were loaded entirely into the player so you could skip back by up to 15 tracks if you started from any position other than the start of the playlist, but this causes delays for no reason, now the queue is from the selected song onward. This is how Spotify works as well when starting a playlist not from the first song.

closes #600

@arrillodev arrillodev changed the title Issue600 Issue600 - Slow loading of long playlists May 5, 2026
@arrillodev
Copy link
Copy Markdown
Author

One additional issue this fix exaggerates on my phone is that some other function blocks the main UI thread on app startup if there is a big queue from previous sessions. Presumably there is other code that does exactly the same thing! I will try and look into this tomorrow / later, but I think that should be fixed under a separate issue, perhaps merging the functionality.

…it multiple times if the player changes state before enqueue completes
@eddyizm
Copy link
Copy Markdown
Owner

eddyizm commented May 14, 2026

I'll test this weekend to get into the next pre-release.

@eddyizm eddyizm merged commit f22a8fc into eddyizm:development May 16, 2026
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