-
Notifications
You must be signed in to change notification settings - Fork 96
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
Optimise channel list view updates #561
Conversation
a3e158e
to
7c47795
Compare
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.
seems like you forgot to push the OnLoadViewModifier?
Indeed! |
f054e11
to
76c71fd
Compare
SDK Size
|
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, there are noticeable performance improvements 👏 I did some tests, things seem to be working well. @testableapple would be nice to also give it a go - mostly testing around the channel list. I would like to include this in the SwiftUI release today.
QAd with @testableapple |
|
🔗 Issue Link
PBE-5004
🎯 Goal
Reduce hitches and hangs while scrolling the channel list
🛠 Implementation
ChatChannel
equality implementation was changed)swipedChannelId
sometimes causes unnecessary view updates while just scrolling downChannelAvatarView
level instead (more concise view update cycle when avatar loading finishes)🧪 Testing
Exploratory testing on channel list updates (last message preview, sorting)
🎨 Changes
I did measurements using iPhone 12 Pro Max and repeated each measurement 3 times.
Steps:
Count hitches and hangs during the duration of scrolling in the channel list.
Baseline
Remove explicit view ids
Remove explicit view ids + swipedChannelId change
Remove explicit view ids + swipedChannelId change + avatar optimisation
Based on the data the avatar change is the biggest contributor, while
swipedChannelId
does not add much or anything but I still decided to keep that tiny change.In average the PR reduces hitches ~3.5 times and hangs ~5 times
☑️ Checklist