Skip to content

Improve initial load time by using the event cache - #660

Merged
ulyssa merged 2 commits into
ulyssa:mainfrom
VAWVAW:load-from-cache
Sep 21, 2026
Merged

ulyssa merged 2 commits into
ulyssa:mainfrom
VAWVAW:load-from-cache

Conversation

@VAWVAW

@VAWVAW VAWVAW commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Insert the most recent events from the matrix-sdk cache into RoomInfo before doing network requests. This has reduced the time until the chats are ordered by recent by a factor of 6 for me.
Also use the event cache for backwards pagination.

A possible followup would be to replace the RoomNeeds with a mpsc channel and reduce the debounce the make going back in the scrollback a lot faster. But I ran into issues with creating futures on the run that I didn't want to deal with now.

@VAWVAW
VAWVAW marked this pull request as draft September 4, 2026 22:25
@VAWVAW

This comment was marked as resolved.

@VAWVAW
VAWVAW marked this pull request as ready for review September 5, 2026 09:54
@VAWVAW

This comment was marked as resolved.

@VAWVAW
VAWVAW force-pushed the load-from-cache branch 2 times, most recently from 6eac160 to a7d04ae Compare September 14, 2026 21:07
@ulyssa
ulyssa enabled auto-merge (squash) September 21, 2026 01:59
@ulyssa ulyssa added this to the v0.0.13 milestone Sep 21, 2026
@ulyssa
ulyssa merged commit d63f357 into ulyssa:main Sep 21, 2026
5 checks passed
@VAWVAW
VAWVAW deleted the load-from-cache branch September 21, 2026 10:31
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