-
Notifications
You must be signed in to change notification settings - Fork 6
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: schedule updating conversation read status [WPB-9216] #2865
perf: schedule updating conversation read status [WPB-9216] #2865
Conversation
Instead of just doing it immediately when called, schedule it to be executed using the new ParallelConversationWorkQueue, that allows one work to be executed at a time per conversation. Also, add a little debounce to the queue, in case the user is scrolling down through the messages.
Test Results2 226 tests - 871 2 220 ✔️ - 772 4m 52s ⏱️ + 1m 16s Results for commit ffe8dbb. ± Comparison against base commit 26d21ef. This pull request removes 3097 and adds 2226 tests. Note that renamed tests count towards both.
This pull request removes 105 skipped tests and adds 6 skipped tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
Datadog ReportBranch report: ✅ 0 Failed, 2997 Passed, 105 Skipped, 14.61s Total Time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great!
Just 2 comments on using the implementation instead of the interface
logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/conversation/ConversationScope.kt
Outdated
Show resolved
Hide resolved
logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/message/MessageScope.kt
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
Currently, if the Android app calls to update the conversation read date multiple times, there's nothing that Kalium does to protect from overworking.
Solutions
Instead of just doing it immediately when called, schedule it to be executed using the new
ParallelConversationWorkQueue
, that allows one work to be executed at a time per conversation.Add a little debounce to the queue, in case the user is scrolling down through the messages.
Before executing work, check if the lastRead is actually being updated forward (new time is newer than persisted time).
With all of these recent changes, some improvements can be seen:
Video
From the sender point of view, receipts are sent progressively as the reader scrolls.
Receeeipts.mp4
Testing
Test Coverage
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.