-
Notifications
You must be signed in to change notification settings - Fork 355
perf: MessageList livestreaming improvements
#3244
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… state update queue
SDK Size
|
khushal87
approved these changes
Oct 15, 2025
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.
LGTM. Just please not down the issues with FlashList somewhere so that we can refer.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎯 Goal
This PR implements significant (optional) performance improvements for our
MessageListcomponent in very high WS event traffic situations.Provided below is a non-exhaustive list of everything done:
isLiveStreamingmode for both list implementationsFlashListFlashListusePrunableMessageListswipeToReplyis disabledChannelPreviewupdates during high trafficAlthough all of the performance improvements are significant, the heaviest hitters here are message pruning and the ability to turn swipe-to-reply off.
FlatListcaches if items are rendered at all even once, as well as references to native views that prevent the GC from cleaning stuff up properly (or fast enough). This way, we force the list to treat items outside of our window as "removed" - and then paginate as needed to the old items. This can be improved in the future, needless to say - this fix is just immediate measure. Pruning is not needed at all forFlashListdue to how it handles things internally, nor does it work properly, so it should be avoided (MVCP sometimes breaks for certain window thresholds).Gestures as well as some other overhead regardless of whether it's been enabled or not. Normally, this is pretty insignificant - but multiplied by many, many messages it caused a constant increase in memory as messages arrive and are rendered at least once. This was especially noticeable onAndroidand easily debuggable through the performance module in AS. This is also something that can be done in a better way in the future, however in the interest of time right now and so that livestreaming is amendable this'll have to do for now.Note: This PR has to be merged and
stream-chatupdated before we can proceed with releasing this one.🛠 Implementation details
🎨 UI Changes
iOS
Android
🧪 Testing
☑️ Checklist
developbranch