Skip to content

Open chats with their latest page of messages, older ones on scroll - #354

Merged
niclas-j merged 1 commit into
mainfrom
c/desktop-perf-2
Nov 1, 2026
Merged

niclas-j merged 1 commit into
mainfrom
c/desktop-perf-2

Conversation

@niclas-j

@niclas-j niclas-j commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator
  • The desktop loaded every message of a chat on open and on every refetch; it now asks for the latest 40 and loads the page before when you scroll near the top (scroll position kept, already-loaded pages survive refetches, search links load until the message is there).
  • 56-message chat: open 1.7 s → 0.42 s, JS heap 364 MB → 140 MB, core response 25.9 MB → 0.16 MB.

The desktop fetched every message of a chat on open and on each refetch. It now asks for the latest page; scrolling
near the top loads the page before (scroll position kept by the height that came in), a refetch keeps the older pages
already loaded in front of the new window, and a search link to an older message loads pages until it is there.
Measured in a 56-message chat: open 1.7 s -> 0.42 s, JS heap 364 MB -> 140 MB, DOM nodes halved; the core serves
0.16 MB instead of 25.9 MB for it.
@niclas-j
niclas-j merged commit 9858757 into main Nov 1, 2026
6 checks passed
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