-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
MM-34585 Use removeClippedSubviews from Lists to improve scroll perf #5199
Conversation
Building app in separate branch. |
Float refreshRate = (Float)stringObjectHashMap.getOrDefault("refreshRate", 0f); | ||
if (!seen || Math.round(refreshRate) == 60) { | ||
seen = true; | ||
best = stringObjectHashMap; |
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.
You can just break out of the for loop after setting best.
android/app/src/main/java/com/mattermost/rnbeta/MainActivity.java
Outdated
Show resolved
Hide resolved
@@ -550,14 +550,14 @@ workflows: | |||
- test | |||
filters: | |||
branches: | |||
only: /^build-pr-.*/ | |||
only: /^(build|android)-pr-.*/ |
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.
Would this PR be reverted at some point? If so, consider having these changes in a separate PR?
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.
I would like to keep this, that way if a PR fails for a particular platform we can just build the platform that we need
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.
Oh yea, I meant that this specific change can be in a separate PR if you foresee the FPS changes being reverted in the future?
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.
maybe ;)
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. I don't have similar devices as found in the original issue and I can't find a hardware profile online to emulate. I just did a smoke test on a Pixel 3 XL (Android 11) devices and I don't experience sluggishness. Navigation, interaction with components, posting messages, switching channels and teams, searching, etc all seem to be functioning well.
Let me know if there's specific areas I need to test more.
@josephbaylon people over here #5046 can share more data points |
I've got a Note 20 that I'm experimenting with - I don't think this PR has fixed the issue; unsure of what the cause is. |
@SHAZM you and I should work together on this one, perhaps friday or over the weekend |
Building app in separate branch. |
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.
I retested on a Pixel 3 XL (Android 11) device and I'm not experiencing sluggishness. Scrolling, navigation, interaction with components, posting messages, switching channels and teams, searching, etc all seem to be functioning well.
@SHAZM has the device where he can repro the original issue. I'll wait for his testing before I approve the PR.
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.
Tested on my Pixel 5. Showed some improvements. Performance graph showed less extreme spikes when movement was happening on the screen. Still room for improvement but a good start.
Spoke with @SHAZM this is OK to merge |
Cherry pick is scheduled. |
…attermost#5199) (cherry picked from commit 9c043f1)
Summary
A few users have reported that in some android devices (Samsung with OneUI 3+) the app runs at low fps, this seems to be related with screens that are capable to have a higher refresh rate. Following the RN docs we are now using
removeClippedSubviews
to help improve the scrolling perf.Ticket Link
Resolves: #5046
https://mattermost.atlassian.net/browse/MM-34585