Repository navigation
perf(home): smoother vertical scrolling in Netflix-style Home - #830
Merged
ProdigyV21 merged 3 commits intoOct 26, 2026
Merged
Conversation
Moving down in the Netflix layout resized every card of two rails at once (the row being left shrank while the row being entered grew), plus their headings and descriptions, re-measuring the whole list on each frame of the vertical scroll. The row being left now keeps its expanded layout while the scroll carries it out the top and collapses in one frame once off screen. Moving up is unchanged, since the row being left stays visible below. Row headings scale with graphicsLayer instead of animating their font size.
silentbil
marked this pull request as draft
October 25, 2026 04:45
Each card read its animated width and height in composition, so every card of both morphing rows recomposed (MediaCard included) on every frame of the 220 ms row morph. The cards now get their target size and a layout modifier sizes them to the running animation values, so a frame only re-measures them. MediaCard gains fillArtworkHeight so its artwork follows the height the parent gives it. Measured on a Mi Box 4 (release build, one Down press every ~0.5 s): 90th-percentile frame time 104 -> 76 ms, janky frames 51% -> 46%.
silentbil
marked this pull request as ready for review
October 25, 2026 13:07
Owner
|
I think we can also make horizontal smoother, especially when holding down right or left it can be improved a lot, think you can do that as well? |
Collaborator
Author
@ProdigyV21 i dont have any issues in horizontal scrolling, i checked old devices too. |
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.
Summary
Smoother vertical scrolling in the Netflix-style TV Home.
Moving down used to resize every card of two rails at once: the row being left shrank while the row being entered grew, along with their headings and descriptions. That re-measured the whole list on every frame of the vertical scroll.
graphicsLayerinstead of animating their font size, so the text is no longer re-measured each frame.MediaCardgainsfillArtworkHeightso its artwork follows the height the parent gives it.Testing
Release (R8) builds on a Xiaomi Mi Box 4 (Android 9). Frame times come from
dumpsys gfxinfoover 20 Down presses from the top of Home; the two builds were alternated, 3 runs each, on the same rows.1. Keep the leaving row expanded (first commit) vs
main, one press every ~1.4 s and every ~0.9 s:2. Morph size at layout time (
ca7ac54d) vs the first commit, one press every ~0.5 s:ca7ac54dTogether, the stutters that are visible on the box (90th–99th percentile) are roughly a quarter to a third shorter at each step. Unit tests (Netflix home and card components) and
NetflixVerticalNavigationDeviceTestpass.