metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

[Bug]: Toggling Popular/Current Networks in Asset list lags the wallet substantially

Open dylanbutler1 opened this issue 8 months ago • 14 comments

Describe the bug

Toggling Popular/Current Networks in Asset list lags the wallet substantially on iOS.

Expected behavior

No response

Screenshots/Recordings

No response

Steps to reproduce

  1. Open wallet
  2. Toggle Poppular Networks / Current Network and vice versa.
  3. Observe: Wallet becomes laggy, sometimes the wallet does not register any taps, sometimes it takes a few seconds for the selection options to appear.

Error messages or log output


Detection stage

During release testing

Version

7.45.0

Build type

None

Device

iPhone X

Operating system

iOS

Additional context

No response

Severity

No response

dylanbutler1 avatar Apr 24 '25 16:04 dylanbutler1

Side note: I'm seeing slowness anywhere a bottom sheet is being used, not just with this one.

darkwing avatar Apr 24 '25 19:04 darkwing

Hi Team,

We're seeing a performance improvement following this fix for accounts list, but also overall.

Checking the Popular networks/current networks tab, there still seems to be a 5-7 sec delay when switching to popular networks view for accounts with multiple assets. The bottom sheet buttons seem responsive with no delay.

The QA builds for the fix are added here:

iOS Android

https://github.com/user-attachments/assets/83a1ba5e-dceb-4daa-b94c-733ae0c745a8

Unik0rnMaggie avatar Apr 25 '25 12:04 Unik0rnMaggie

Hi Team,

Please see below recordings for testing on latest build v7.45.0 (1732):

Overall, the issue seems more noticeable when there are multiple accounts in the wallet (over 30) and more noticeable on iOS than Android:

iOS:

  • with 6-8 accounts: 2-3 sec delay
  • with 30 accounts: 5-7 sec delay

Android:

  • with 6-8 accounts: no delay
  • with 30 accounts: 3-4 sec delay

iOS v7.45.0 (1732) Popular networks/current network 6 accounts

iOS v7.45.0 (1732) Popular networks/current network 6 accounts multiple assets

iOS v7.45.0 (1732) Popular networks/current network 31 accounts multiple assets

iOS v7.45.0 (1732) Popular networks/current network 6 vs 31 accounts

Android v7.45.0 (1732) Popular networks/current network 12 accounts

Android v7.45.0 (1732) Popular networks/current network 31 accounts multiple assets

Samsung Galaxy S23 Ultra 13.0 - Popular networks/current network 31 accounts

Unik0rnMaggie avatar Apr 28 '25 07:04 Unik0rnMaggie

Tested fix from here

Unik0rnMaggie avatar Apr 28 '25 15:04 Unik0rnMaggie

Hi @Prithpal-Sooriya,

This issue has been closed. Please complete this RCA form: https://docs.google.com/forms/d/e/1FAIpQLSdnPbJISzFlR_aQD2uRpnMKSoGAopuTd_yeZK7J4Q5GzgbsOA/viewform?usp=pp_url&entry.340898780=14856

github-actions[bot] avatar Apr 28 '25 19:04 github-actions[bot]

Other PRs that help improve performance: https://github.com/MetaMask/metamask-mobile/pull/14920 https://github.com/MetaMask/metamask-mobile/pull/14928 https://github.com/MetaMask/metamask-mobile/pull/14942

Prithpal-Sooriya avatar Apr 28 '25 19:04 Prithpal-Sooriya

Testing latest fix on QA build , performance improved, on both iOS and Android:

https://github.com/user-attachments/assets/987d7c7b-cd27-4131-b7bb-21a1a3569669

https://github.com/user-attachments/assets/49cb206f-8e02-4aa3-a4f7-1a3930c77692

Testing on latest RC build 7.45.0 (1738) for Android, still small delay if assets are not fully loaded. not reproducible all the time:

  • when clicking on the network picker (Popular networks/Current network)
  • when clicking on the bottom sheet buttons

https://github.com/user-attachments/assets/6dc4477d-b01d-44c3-8390-8c29907e504c

on iOS same small delay if assets are not fully loaded, when clicking on the network picker:

https://github.com/user-attachments/assets/fd37dfc6-b85e-41aa-83a3-f149e3cdeee9

Unik0rnMaggie avatar Apr 29 '25 06:04 Unik0rnMaggie

Significant performance degradation, freezes when switching to Popular networks view, iOS, 7.46.0 (1737). I couldn't do anything while being on Popular networks. Switching back to Current network view will resolve the issues (if you are able to switch):

https://github.com/user-attachments/assets/2b7a50ec-7901-41b2-b340-bf24bf89f0f1

sleepytanya avatar Apr 30 '25 00:04 sleepytanya

Hi @Prithpal-Sooriya,

This issue has been closed. Please complete this RCA form: https://docs.google.com/forms/d/e/1FAIpQLSdnPbJISzFlR_aQD2uRpnMKSoGAopuTd_yeZK7J4Q5GzgbsOA/viewform?usp=pp_url&entry.340898780=14856

github-actions[bot] avatar Apr 30 '25 21:04 github-actions[bot]

Still see big delays on Android, 7.46.0 (1800):

https://github.com/user-attachments/assets/9b74381c-3f61-46e1-9e38-3fd7670516d4

sleepytanya avatar May 08 '25 03:05 sleepytanya

Margelo are currently helping us to increase speed here.

darkwing avatar May 08 '25 14:05 darkwing

Performance is much better than the original video. There is still some lag and we're working on further improvements with Margelo.

Lets keep this open, but moving this to a sev-2 to prevent this from being a release blocker.

Prithpal-Sooriya avatar May 09 '25 11:05 Prithpal-Sooriya

Thanks @Prithpal-Sooriya, great work, and does that mean those optimizations will be cherry-picked into 7.49? Thanks

dlefloch avatar Jun 09 '25 10:06 dlefloch

Hey @dlefloch , yep most of the linked PRs in this issue will be in 7.49.0. Will keep you, and this issue posted on more performance PRs.

Prithpal-Sooriya avatar Jun 09 '25 13:06 Prithpal-Sooriya

closing because we have other tickets to track performance

alfeng6 avatar Jul 30 '25 18:07 alfeng6