Actual behaviour
SDK version: stream-chat-swift / stream-chat-swiftui 5.5.1
Swift: 6 / strict concurrency enabled
When I open a channel, the app freezes for a few seconds. Time Profiler shows the main thread blocked inside:
ChannelUpdater.cleanStaleMidPageStateIfNeeded(for:isInRecoveryMode:)
└─ writableContext.performAndWait { ... }
└─ channelDTO.cleanAllMessagesExcludingLocalOnly()
└─ writableContext.save()
This runs synchronously at the start of ChannelUpdater.update(), which is called from ChatChannelController.synchronize(). Since synchronize() is @mainactor and ChatChannelViewModel calls it in init, the UI thread blocks until Core Data finishes.
Everything worked flawlessly on version 4.97.0.
On v5.1.0 it was better than on v5.2.0
Unfortunately, starting from version 5.2.0, the app has become extremely problematic
Expected behaviour
Opening a channel should feel instant.
Steps to reproduce
Connect a user with a non-trivial inbox (many channels, some with long history).
Open a channel
Navigate back to the channel list.
Open the same/other channel again.
Which packages are you using?
No response
Which SDK version are you using?
5.5.1
Which iOS version is the issue reproducible?
iOS 26.3, 26.4, 26.5
Which iPhone Device is the issue reproducible?
Any
Which Xcode version are you using?
Xcode 26.2
Actual behaviour
SDK version: stream-chat-swift / stream-chat-swiftui 5.5.1
Swift: 6 / strict concurrency enabled
When I open a channel, the app freezes for a few seconds. Time Profiler shows the main thread blocked inside:
This runs synchronously at the start of ChannelUpdater.update(), which is called from ChatChannelController.synchronize(). Since synchronize() is @mainactor and ChatChannelViewModel calls it in init, the UI thread blocks until Core Data finishes.
Everything worked flawlessly on version 4.97.0.
On v5.1.0 it was better than on v5.2.0
Unfortunately, starting from version 5.2.0, the app has become extremely problematic
Expected behaviour
Opening a channel should feel instant.
Steps to reproduce
Which packages are you using?
No response
Which SDK version are you using?
5.5.1
Which iOS version is the issue reproducible?
iOS 26.3, 26.4, 26.5
Which iPhone Device is the issue reproducible?
Any
Which Xcode version are you using?
Xcode 26.2