Skip to content

perf(shorts): play the opened short while the feed loads - #2324

Merged
A-EDev merged 1 commit into
mainfrom
perf/shorts-first-frame
Nov 23, 2026
Merged

A-EDev merged 1 commit into
mainfrom
perf/shorts-first-frame

Conversation

@A-EDev

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

Copy link
Copy Markdown
Collaborator

Summary

  • A Short opened from a link or a shelf now plays as soon as its streams resolve. The Shorts queue shows it on its own and the feed page lands behind it at the same position.
  • The opening feed round builds its first page after 2.5 s from the lanes that answered (plus the saved reserve) when one lane is slow. Late lanes fill the next page.
  • Before this, the opened Short was not handed to a player until all ten opening requests finished, so a single 4 s or 8 s timeout held the first frame for 14 to 28 s on a slow connection.

Related issue

Change type

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

Validation

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

Link to first frame, three cold opens of a Shorts link on the same phone and Wi-Fi: before 27.6 s, 27.4 s, 14.0 s; after 4.0 s, 2.9 s, 3.1 s. Feed page 1 still arrived behind the open Short and swiping to the next Short played in 6 ms.

Test device and Android version: Xiaomi 2311DRK48G, Android 16 (HyperOS)

Screenshots or recordings

Risk and compatibility

Lanes still out at the deadline keep running and the next page waits for them, so no request is dropped or duplicated. Pool and used-id access now share one lock because those lanes can offer while a page assembles.

  • 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 50b5cff into main Nov 23, 2026
14 of 15 checks passed
@A-EDev
A-EDev deleted the perf/shorts-first-frame branch November 23, 2026 17:14
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