Issue600 - Slow loading of long playlists#627
Merged
Conversation
added 5 commits
May 5, 2026 12:28
…he first 10 songs before loading the rest
…n thread Tidied up startQueue function changes
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
Owner
|
I'll test this weekend to get into the next pre-release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
startQueuefunction.There was slight modification to
enqueuealso 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