Repository navigation
Keep unchanged rows between renders on profiles, Starred and threads - #49
Merged
Merged
Conversation
The Log keeps the rows it drew last frame (RowCache, from #40), so a render only builds the rows that changed. Profiles, Starred and a commit's replies drew every row afresh on every render, so they got slower with every page they loaded, as the Log did. A profile keeps a cache per tab, Starred keeps one, and a thread keeps its replies. The commits above a thread's replies still build every time: they read what the screen shows of the thread, which the cache doesn't hash. The tab you're not on in a profile now previews three commits instead of five, as the Log's pages beside yours do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The Log keeps the rows it drew last frame (
RowCache, from #40), so a render only builds the rows that changed. On Simon's iPhone that took a render at 200 commits from 443 ms to 77 ms. Profiles, Starred and a commit's replies still built every row on every render, so they got slower with each page they loaded, as the Log did.This gives them the same cache:
feedas the Log does.feed.The cache is safe to use with the same rows on other screens because the row partials only read from the screen what
RowInputsalready covers: viewer, pasteis, stashes, opened threads, unfolded commits and tombstones. I checked every variable the commit row and reply partials read.The tab you're not on in a profile now previews three commits instead of five, as the Log's pages beside yours do since #36.
The other Log fixes already reach these screens. The slimmer commit row (#41) is the same partial, the image cache and native dashed borders are app-wide, and Profile already only pulses the skeleton on the tab you're on (#32). Notifications and Remotes draw different rows, so they aren't in this PR.
Tests:
RowCacheScreensTestchecks each screen builds no rows when nothing changed, only the changed ones when something did, and draws kept rows the same as fresh ones. On a thread that's the last reply of a page and the new page's replies. The full suite passes (1026).I haven't measured these screens on a phone.
🤖 Generated with Claude Code