Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid cached scrollbacks if stream contains a renderable event #1292

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

erikolsson
Copy link
Contributor

@erikolsson erikolsson commented Oct 18, 2024

Client init performance tweak.
We're performing scrollbacks hoping to pick up renderable events. By skipping cached scrollbacks when the loaded miniblocks already contain a renderable event, we can return early.

Lowers the duration of loadStreamsFromPersistence on my machine with my user's streams from ~7500ms to ~6500ms.

This logic could also be tweaked to guarantee that a stream contains a top-level renderable event.

@texuf texuf merged commit fce367c into main Oct 18, 2024
7 checks passed
@texuf texuf deleted the erik/top-level-renderable-event-count branch October 18, 2024 20:04
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