-
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
fix: ANRs when getting identities [WPB-8753] #2718
Conversation
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.
🚀 Just small naming suggestion, cool idea about the CurrentTimeProvider
...c/src/commonMain/kotlin/com/wire/kalium/logic/data/conversation/MLSConversationRepository.kt
Outdated
Show resolved
Hide resolved
logic/src/commonMain/kotlin/com/wire/kalium/logic/util/ExpirableCache.kt
Outdated
Show resolved
Hide resolved
Datadog ReportAll test runs ✅ 2 Total Test Services: 0 Failed, 2 Passed Test Services
|
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.
tbh, i am not sure about the cache for user identities, i would rather fix the root cause, ObserveParticipantsForConversationUseCase
. is calling this function on each update, maybe we can change this to not fetch this info on each flow emit but have it fetched separately in the view model when needed?
Sure, this cache isn't that much of an improvement (in that particular case it was making only one less request thanks to this cache) so it got removed and instead implemented the way to keep already fetched data and only fetch for newly emitted ones: wireapp/wire-android#2942 (all other places where user identities or client identities are fetched do not involve flows so do not have this problem). |
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.
great work 👍🏼
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
ANR when trying to get user or device identities.
Solutions
ObserveConversationMembersUseCase
was emitting the same items multiple times, especially when navigating in the app, and it was causing the spam ofgetUserIdentities
and probably overloadingCoreCrypto
, sodistinctUntilChanged
worked.Testing
Test Coverage (Optional)
How to Test
Navigate: group conversation -> details -> participants -> user profile -> 1:1 conversation -> back or conversation details
Attachments (Optional)
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.