Skip to content

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

Open
VAWVAW wants to merge 3 commits into
ulyssa:mainfrom
VAWVAW:load-from-cache
Open

Improve initial load time by using the event cache#660
VAWVAW wants to merge 3 commits into
ulyssa:mainfrom
VAWVAW:load-from-cache

Conversation

@VAWVAW

@VAWVAW VAWVAW commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

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

VAWVAW commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

I had some problems with this not properly loading member events. I will lock into this.

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

VAWVAW commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

I can't reproduce my issue and this PR doesn't touch member loading, so it was probably a fluke.

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