Skip to content

perf(client): smoother chat scrolling with wider list cache#1116

Open
NC1107 wants to merge 1 commit into
mainfrom
perf/chat-list-cache-extent
Open

perf(client): smoother chat scrolling with wider list cache#1116
NC1107 wants to merge 1 commit into
mainfrom
perf/chat-list-cache-extent

Conversation

@NC1107
Copy link
Copy Markdown
Owner

@NC1107 NC1107 commented May 22, 2026

Summary

The chat `ListView.builder` had no explicit `cacheExtent`, defaulting to 250px. For messages that include images, reactions, and reply quotes — each requiring a frame to lay out — momentum scrolling occasionally flashed blank space before items mounted. Bump to 600px (about one viewport) so the visible window stays warm during fast scrolling.

Test plan

  • `flutter analyze` clean
  • `flutter test test/widgets/chat_panel/` — 4/4 pass

Behind the scenes

Single-line change in `chat_message_list.dart`. No behaviour change, only smoother scrolling.

…shing

The chat ListView used Flutter's default cacheExtent of 250px, which is too
tight for messages that include images, reactions, and reply quotes — each
takes a frame to lay out, so momentum scrolling on long histories briefly
showed blank space before items mounted. Bumped to 600px (about one viewport)
so the visible window stays warm during fast scrolling.
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.

1 participant