stream-chat-swift icon indicating copy to clipboard operation
stream-chat-swift copied to clipboard

Modern state layer

Open laevandus opened this issue 9 months ago β€’ 2 comments

πŸ”— Issue Links

Resolves ios-issues-tracking/728

🎯 Goal

Add a modern state layer with async-await and observable state objects

πŸ“ Summary

A new set of types which represent a new way how to interact with Stream API (alternative way to controllers).

  • Leverages async-await
  • Method calls wait for API requests to finish
  • Main actor guarded state objects for easy way for observing data changes

New types:

  • ChannelList & ChannelListState
  • Chat & ChatState + MessageState
  • ConnectedUser + ConnectedUserState
  • MemberList + MemberListState
  • MessageSearch + MessageSearchState
  • ReactionList + ReactionListState
  • UserList + UserListState
  • UserSearch + UserSearchState

β˜‘οΈ Contributor Checklist

  • [x] I have signed the Stream CLA (required)
  • [x] This change follows zero ⚠️ policy (required)
  • [x] This change should be manually QAed
  • [x] Changelog is updated with client-facing changes
  • [x] New code is covered by unit tests
  • [ ] Comparison screenshots added for visual changes
  • [x] Affected documentation updated (docusaurus, tutorial, CMS)

laevandus avatar May 03 '24 07:05 laevandus

StreamChat XCMetrics

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 5.01 ms 49.9% πŸ”Ό 🟒
Duration 2.6 s 2.55 s 1.92% πŸ”Ό 🟒
Hitch time ratio 4 ms per s 1.97 ms per s 50.75% πŸ”Ό 🟒
Frame rate 79 fps 78.04 fps 1.22% πŸ”Ό 🟒
Number of hitches 1 0.6 40.0% πŸ”Ό 🟒
ChannelList Hitches total duration 12.5 ms 1.67 ms 86.64% πŸ”Ό 🟒
Duration 2.6 s 1.37 s 47.31% πŸ”Ό 🟒
Hitch time ratio 5 ms per s 1.17 ms per s 76.6% πŸ”Ό 🟒
Frame rate 76 fps 86.89 fps -14.33% πŸ”½ πŸ”΄
Number of hitches 1.2 0.2 83.33% πŸ”Ό 🟒

Stream-SDK-Bot avatar May 03 '24 07:05 Stream-SDK-Bot

1 Warning
:warning: Big PR

Generated by :no_entry_sign: Danger

github-actions[bot] avatar May 03 '24 07:05 github-actions[bot]