fix(home,playlist): speed up loading of YouTube generated personal pl…#805
Open
adam-adrian wants to merge 2 commits into
Open
fix(home,playlist): speed up loading of YouTube generated personal pl…#805adam-adrian wants to merge 2 commits into
adam-adrian wants to merge 2 commits into
Conversation
…aylists Reduce blocking network work that caused ArchiveTune to take ~1 minute to show YouTube-generated personal playlists (Liked Music, My Supermix, My Mix 01-04) while Metrolist showed them quickly. Changes: - OnlinePlaylistViewModel: remove .completed() from initial playlist load. Show the first page immediately and set continuation = songsContinuation or continuation, letting loadMoreSongs() fetch later pages on demand. This matches Metrolist behavior. - Utils: lower LibraryPage.completed() maxRequests from 500 to 50 so the home "Mixes" / account-playlists row does not make hundreds of sequential continuation requests. - HomeViewModel: run refreshAccountIdentity() and refreshAccountPlaylistsInternal() in parallel instead of serializing the playlist fetch behind account info and channel listing. Fixes slow loading of YouTube-generated auto playlists compared to Metrolist.
Member
|
Looks good overall and the performance goal makes sense. One thing I’d like checked before merge: the new parallel |
Apply review feedback on the generated-playlist loading fix: - Wrap parallel refreshAccountIdentity() and refreshAccountPlaylistsInternal() calls in supervisorScope so isAccountLoading / isProcessingAccountData are not cleared before those jobs finish. This prevents stale account/channel/playlist state from updating after a subsequent refresh or account switch. - Move the login-triggered sync to start after the scope so it runs with fresh account/playlist data. - Replace the bare 50 request cap in LibraryPage.completed() with the named constant LIBRARY_COMPLETION_MAX_REQUESTS and add a short comment, since it affects all library-grid completions globally (e.g. FEmusic_liked_playlists / generated mixes). Generated playlists still paginate correctly: loadMoreSongs() uses the stored songsContinuation ?: continuation with YouTube.playlistContinuation().
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.
…aylists
Reduce blocking network work that caused ArchiveTune to take ~1 minute to show YouTube-generated personal playlists (Liked Music, My Supermix, My Mix 01-04).
Changes:
Fixes slow loading of YouTube-generated auto playlists.