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

PERF: Reduce overhead from chat message excerpt #26712

Merged
merged 8 commits into from
Apr 25, 2024

Conversation

dbattersby
Copy link
Contributor

@dbattersby dbattersby commented Apr 23, 2024

This change moves the chat message excerpt into a new database column (string) on the chat_messages table.

As part of this change, we will now set the excerpt within the Chat::CreateMessage service, and update it within the Chat::UpdateMessage service.

@github-actions github-actions bot added the chat PRs which include a change to Chat plugin label Apr 23, 2024
@dbattersby dbattersby force-pushed the chat-message-excerpt-improvements branch 3 times, most recently from 0684bc4 to 9723c7e Compare April 24, 2024 07:24
@dbattersby dbattersby force-pushed the chat-message-excerpt-improvements branch from 9723c7e to e875ee7 Compare April 24, 2024 07:39
@dbattersby dbattersby marked this pull request as ready for review April 24, 2024 08:30
@jjaffeux jjaffeux merged commit c62d361 into main Apr 25, 2024
16 checks passed
@jjaffeux jjaffeux deleted the chat-message-excerpt-improvements branch April 25, 2024 12:29
dbattersby added a commit that referenced this pull request Apr 26, 2024
Follow up to #26712 to account for older threads that don't have a persisted excerpt, as this was previously generated on every page load.

This change allows us to build the excerpt on the fly when none exists, fixing the issue of missing message excerpts for thread previews (within channel) and thread lists (on mobile/desktop).
@discoursebot
Copy link

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/chat-replies-missing-excerpt/305991/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chat PRs which include a change to Chat plugin
3 participants