Skip to content

perf(library): playlist writes touch only what changed - #2312

Merged
A-EDev merged 16 commits into
mainfrom
perf/playlist-library-writes
Nov 23, 2026
Merged

A-EDev merged 16 commits into
mainfrom
perf/playlist-library-writes

Conversation

@A-EDev

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

Copy link
Copy Markdown
Collaborator

Summary

  • Adding many videos to a playlist (save to library, merge, imports) is one database transaction instead of one per video.
  • Refreshing a saved YouTube playlist keeps each video's date added, and writes nothing when the list did not change.
  • Moving a video in a playlist writes only the rows whose position changed (falls back to renumbering legacy rows once).
  • A saved playlist checks YouTube at most every 6 hours, and walks every page only when the first page or the count differs.

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

No Room schema change. Positions keep the ascending-index convention; device sync reads only the order. The saved-playlist check time is stored in the existing SavedPlaylistSyncStore DataStore. Phone check: a saved playlist sent one browse request on first open and none on the second; a reorder by drag survived closing and reopening the playlist.

  • 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
perf(playlists): load YouTube playlists a page at a time
feat(player): playlist queues keep loading their playlist
feat(player): queue sheet repeat modes and easier playlist reordering
@github-actions github-actions Bot added player Video and audio playback extraction InnerTube / NewPipe extraction and networking labels Nov 23, 2026
@A-EDev
A-EDev merged commit 7ce3b88 into main Nov 23, 2026
17 of 21 checks passed
@A-EDev
A-EDev deleted the perf/playlist-library-writes branch November 23, 2026 11:47
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 extraction InnerTube / NewPipe extraction and networking player Video and audio playback ui Compose UI, theming, or Material 3 surfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant