-
Notifications
You must be signed in to change notification settings - Fork 211
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
Make accessing ChatClientConfig
in the Database Layer safer
#3566
Make accessing ChatClientConfig
in the Database Layer safer
#3566
Conversation
SDK Size
|
Sources/StreamChat/Controllers/ChannelController/ChannelController.swift
Outdated
Show resolved
Hide resolved
3cf4b87
to
f9c67d2
Compare
ChatClientConfig
in the Database Layer safer
SDK Performance
|
5ee6a44
to
fa7b0f1
Compare
SDK Size
|
d65f904
to
5616a52
Compare
performAndWait { | ||
config = userInfo[Self.chatClientConfigKey] as? ChatClientConfig | ||
} |
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.
Hum I see, I'll do a couple more perf tests. But if there is a significant impact, maybe it is better we remove the performAndWait
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.
Let's re-test this with this branch: #3564
For now we merge it as it
…from-coredata-contexts
Quality Gate passedIssues Measures |
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.
✅
🔗 Issue Links
Resolves https://linear.app/stream/issue/IOS-639/
🎯 Goal
Make accessing the
ChatClientConfig
internally more thread safer.🛠 Implementation
Initially, the idea was to pass
ChatClientConfig
around instead of accessing directly in theNSManagedObjectContext
. The problem is that this would cause a massive amount of breaking changes. So the plans changed, and now the wholeChatClientConfig
is stored in theNSManagedObjectContext.userInfo
, but we make it thread-safe.🧪 Manual Testing Notes
N/A
☑️ Contributor Checklist
docs-content
repo