Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Skip generatePreview if event is not part of the live timeline #6098

Merged
merged 1 commit into from
May 25, 2021

Conversation

germain-gg
Copy link
Contributor

generatePreview is called all the time when loading a new set of messages in the timeline. We can safely skip that operation if the event is not part of the live timeline as by definiton the message preview will only be required for newer events

This actions takes up to ~40ms depending on the type of preview to generate

@germain-gg germain-gg requested a review from a team May 25, 2021 15:39
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane, great!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants