perf(app): reduce jank and microstutter when scrolling the chat list - #1450
Merged
Conversation
- Don't rebuild the chat list header on scrolling all the time: hand the scroll offset down as a ValueNotifier, so only the title pill listens to it instead of the whole header rebuilding on every frame. - Add repaint boundaries around the scrollbar thumb and the tab bar, which otherwise repaint the whole scaffold above the viewport on every scroll frame. - Render the avatar with one decoration instead of a background plus a foreground (one render object instead of two), and lay out the fallback letter only when no picture covers it. - Resolve time formats and localizations in build instead of in the LiveTime format callback, which runs on every clock tick for every live row. TimeFormats.of walks the element tree looking for an SDTFScope, which is not for free. - Cache DateFormat instances and regexes in time label resolving. - Configure 3x viewport scroll cache extent for the chat list. This results in less dropped frames and more smooth scrolling.
gferon
self-requested a review
August 17, 2026 10:04
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.
This results in less dropped frames and more smooth scrolling.