perf(mobile): speed up large Android threads - #5393
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
b3d6668 to
0ebe016
Compare
f897132 to
39bf858
Compare
bba60e2 to
eeb9a52
Compare
6bf27aa to
3e07aab
Compare
7533aeb to
17a7a67
Compare
17a7a67 to
bb6f6a8
Compare
| ); | ||
| } | ||
|
|
||
| function OpeningThreadRouteScreen(props: { |
There was a problem hiding this comment.
🟡 Medium threads/ThreadRouteScreen.tsx:207
OpeningThreadRouteScreen renders LoadingScreen below an in-flow AndroidScreenHeader, but LoadingScreen independently adds paddingTop: insets.top. On Android the header already reserves the top safe-area inset, so the loading state double-counts the status-bar inset and shifts the centered spinner/message downward relative to the hydrated thread screen. Consider using a loading body that omits the top inset when rendered under this header.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/mobile/src/features/threads/ThreadRouteScreen.tsx around line 207:
`OpeningThreadRouteScreen` renders `LoadingScreen` below an in-flow `AndroidScreenHeader`, but `LoadingScreen` independently adds `paddingTop: insets.top`. On Android the header already reserves the top safe-area inset, so the loading state double-counts the status-bar inset and shifts the centered spinner/message downward relative to the hydrated thread screen. Consider using a loading body that omits the top inset when rendered under this header.
|
Closing this draft because its scope now overlaps multiple focused efforts and combines thread loading, rendering, navigation, and title/layout stability changes. We should revisit the remaining performance work as smaller, independently measured PRs after the adjacent changes settle. |
Large Android threads can finish syncing while LegendList has no attached visible rows, leaving a blank feed until the user scrolls. Paginated prepends also changed the list-header height on the final page, which moved the title/feed anchor while Android restored visible content.
This draft stays mobile-only:
This does not replace server pagination from #5493. It also does not duplicate #5585: that PR seeds the composer inset before the initial scroll; this one handles positioned recycled rows that still fail to attach/paint. The final #5585 diff applies cleanly on top of this branch.
Verification on
eeb9a52b2, rebased onto upstreammainat89c320df0:fafo about t3code: cold current-head feed became visible without a gesture after roughly 40–45s; 24 alternating full-height swipes left 19 visible text nodes and six copy targets, with no blank recycled viewport;[129,136]–[696,197]across initial loading, both prepends, the final-page transition, and every stress pass;git diff --checkpassed on the implementation head before the rebase.The native blank-until-gesture and title/header-shift failures are fixed in these runs, but the current emulator measurements are not merge-ready. Keep this draft until the final rebased head gets a physical-device release-profile A/B and the remaining thread-load latency and scroll-frame costs are profiled. An earlier same-device physical A/B on the broader mobile rendering scope improved p99 from about 150ms to 73ms and PSS growth from about 161 MB to 97 MB, but that is not a substitute for a final-head rerun.
Implemented with GPT-5.6 Sol in the T3 Code Codex harness.