-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: cp-7.42.0Tokens
screen performance degradation
#13907
fix: cp-7.42.0Tokens
screen performance degradation
#13907
Conversation
…ithub.com:MetaMask/metamask-mobile into mmassets-13850_token-list-performance-degredation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
TokenList
performance degredation
…ation--polling-provider
|
…ing-provider' of github.com:MetaMask/metamask-mobile into mmassets-13850_token-list-performance-degredation--polling-provider
Tokens
screen performance degradationTokens
screen performance degradation
|
|
Description
Over the past couple of versions, we've seen a continued regression to Android performance. This was particularly noticeable when navigating quickly throughout the app, specifically on Samsung and Xaomi devices. We also noticed issues where the TokenList would freeze and become unresponsive.
After troubleshooting with the mobile team and QA, I think we can narrow this down to (at least) two things:
Tokens
screen over-renderingThe following two changes are being introduced in this PR:
Memoizing selectors on
Tokens
screen to optimize rendering withcreateDeepEqualSelector
useSelector
only creates a shallow copy, which may often lead to undesirable behavior.Moving
AssetsPollingProvider
lower down in the component hierarchyStaticIntervalPollingController
(this includes the EVM assets controllers). The idea behind these polling loops is to only start them for components that need the data polled (ie be UI based)While this is a good start, I think that we should continue to expand/refine these changes to optimize performance further in future versions.
Related issues
Partially fixes: #13850
Manual testing steps
Screenshots/Recordings
Before
https://www.loom.com/share/b5c33532e7354a48ba481814dd5fa01c?sid=dd25d6af-5239-4fe4-b113-dc0ebb6e25b7
After
https://www.loom.com/share/2fb837e3607a4e9dba1239555d6b488a?sid=cf8d437d-9ab2-4272-862e-19e5b6eb17df
Pre-merge author checklist
Pre-merge reviewer checklist