Skip to content

perf(playlists): load YouTube playlists a page at a time - #2315

Merged
A-EDev merged 2 commits into
feat/playlist-queue-growthfrom
perf/playlist-paging
Nov 23, 2026
Merged

A-EDev merged 2 commits into
feat/playlist-queue-growthfrom
perf/playlist-paging

Conversation

@A-EDev

@A-EDev A-EDev commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • A YouTube playlist opens with its first page and loads the next page when the list is within 30 rows of its end, instead of reading every page in the background.
  • The whole list loads only when a feature needs it (a sort other than manual, search inside the playlist, save, download, or a downloaded playlist), with a "Loading all N videos" line in the header.
  • The header shows YouTube's video count while pages are still to load.
  • Saving a playlist saves the whole list, not the loaded part.
  • Downloaded YouTube playlists open from the device first and show without a connection.
  • A downloaded playlist shows a "Download N new videos" button for videos added since its download.
  • Whole playlists kept in memory are capped by video count (half on low-RAM devices) and released on low memory.

Stacked on #2314.

Related issue

None

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Build, packaging, or CI
  • Documentation

Validation

  • ./gradlew :app:assembleGithubDebug
  • ./gradlew :app:testGithubDebugUnitTest (top of the stack: 7029 tests, 0 failures)
  • I ran any additional flavor-specific build or test tasks affected by this change. (spotlessCheck, :app:compileFossDebugKotlin)
  • I manually tested the affected behavior on an Android device or emulator.

Test device and Android version: Xiaomi 2311DRK48G, HyperOS (Android 16), github debug build of the top of the stack

Screenshots or recordings

Risk and compatibility

Network: opening a 6,129-video playlist sent 1 browse request in 25 s (before: every page up to the 60-page cap). Scrolling loaded 9 pages one at a time. Choosing Most popular loaded the remaining 59 pages with the header progress line, then showed the full length. The new-videos button appeared after adding a video to a downloaded playlist and went away when it was removed.

  • The change does not introduce secrets, private data, or unexpected telemetry.
  • New user-facing text uses Android string resources.
  • Dependency and lockfile changes are intentional and limited to this PR.
  • Room schema changes include the required version bump and migration, or this PR does not change the Room schema.
  • Breaking changes and upgrade steps are clearly documented.

@github-actions github-actions Bot added documentation Improvements or additions to documentation ui Compose UI, theming, or Material 3 surfaces labels Nov 23, 2026
@A-EDev
A-EDev merged commit 4dba8b1 into feat/playlist-queue-growth Nov 23, 2026
1 check passed
@A-EDev
A-EDev deleted the perf/playlist-paging branch November 23, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ui Compose UI, theming, or Material 3 surfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant