MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
12.02k stars 4.91k forks source link

[Bug]: Performance - Notifications - Enabling Notifications takes a significant amount of time (>6 seconds) and disabling it also few seconds (2-3s) #25754

Open seaona opened 4 months ago

seaona commented 4 months ago

Describe the bug

Enabling Notifications takes a significant amount of time (>6 seconds) and disabling it also few seconds (2-3s). In both cases it takes long:

Expected behavior

This issue can be investigated under the improve performance goal, together with other slow flows that have already been identified

Screenshots/Recordings

https://github.com/MetaMask/metamask-extension/assets/54408225/7d984011-387c-459e-8b54-dd77ccbb724b

Steps to reproduce

  1. Enable Notifications with several accounts in the wallet -- see loading time
  2. Disable Notifications for an individual account -- see loading time
  3. Disable Notifications for all accounts -- see loading time

Error messages or log output

No response

Version

12.0.0

Build type

None

Browser

Chrome

Operating system

Linux

Hardware wallet

No response

Additional context

No response

Severity

No response

Prithpal-Sooriya commented 3 months ago

TY. Jira Ticket created here. Our team will investigate.

Prithpal-Sooriya commented 3 months ago

This is a challenging one. Will investigate. Initial thoughts are that this is either our encryption key creation process, or API requests we are making.

Prithpal-Sooriya commented 3 months ago

Some performance improvements are found in some PRs (cherry-picked into v12.0.0): https://github.com/MetaMask/metamask-extension/pull/25946 https://github.com/MetaMask/metamask-extension/pull/25979

However there does still seem to be a slowness in enabling/disabling notifications. Investigations point to the number of API calls required to setup notifications. Discussing with our team to see how we can alleviate these issues.

Prithpal-Sooriya commented 3 months ago

OK so we've improved perfomance such that the actions above don't take any longer than 3 seconds.

Other tickets have been created to further improve performance: https://consensyssoftware.atlassian.net/browse/NOTIFY-952 https://consensyssoftware.atlassian.net/browse/NOTIFY-953 https://consensyssoftware.atlassian.net/browse/NOTIFY-955 https://consensyssoftware.atlassian.net/browse/NOTIFY-956

I'll remove the regression-prod-12.0.0 tag, but will keep this issue open for our team to track.

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.