Skip to content

perf(app): reduce jank and microstutter when scrolling the chat list - #1450

Merged
gferon merged 2 commits into
mainfrom
dima/perf-chat-list
Aug 17, 2026
Merged

perf(app): reduce jank and microstutter when scrolling the chat list#1450
gferon merged 2 commits into
mainfrom
dima/perf-chat-list

Conversation

@boxdot

@boxdot boxdot commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator
  • 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.

boxdot added 2 commits August 14, 2026 21:49
- 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
gferon self-requested a review August 17, 2026 10:04

@gferon gferon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! ⏩

@gferon
gferon added this pull request to the merge queue Aug 17, 2026
Merged via the queue into main with commit b9c74b9 Aug 17, 2026
20 checks passed
@gferon
gferon deleted the dima/perf-chat-list branch August 17, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants