Skip to content
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

Metamask extension causing startup delay/slow on Firefox #13163

Closed
brizaldi opened this issue Dec 26, 2021 · 10 comments
Closed

Metamask extension causing startup delay/slow on Firefox #13163

brizaldi opened this issue Dec 26, 2021 · 10 comments
Labels
browser-firefox degraded performance Issues relating to slowness of app, cpu usage, and/or blank screens. needs-reproduction Sev2-normal Normal severity; minor loss of service or inconvenience. stale issues and PRs marked as stale type-bug

Comments

@brizaldi
Copy link

Describe the bug
There's a startup delay in Firefox (+- 5 seconds in my device). During this time, all the extensions cannot be used and even when I try to open/browse website, it won't load until this 'startup delay' is finished. After enabling & disabling each extension, I've found that current Metamask extension is causing this.

Steps to reproduce (REQUIRED)
Steps to reproduce the behavior, libraries used with version number, and/or any setup information to easily reproduce:

  1. Use Firefox with Metamask installed
  2. Close Firefox
  3. Open Firefox again
  4. See that there's a delay for several seconds until browser & other extension can be used

Expected behavior
There's no delay after startup, Firefox & it's extension should be quickly available in startup.

Browser details (please complete the following information):

  • OS: Windows 10 21H1 Build 19043.1415
  • Browser: Firefox 95.0.2 (64 bit)
  • MetaMask Version: 10.8.1
@Gudahtt Gudahtt added browser-firefox needs-reproduction Sev2-normal Normal severity; minor loss of service or inconvenience. type-bug labels Dec 27, 2021
@Gudahtt
Copy link
Member

Gudahtt commented Dec 27, 2021

Thanks for the report! Could you share more information about the computer you're experiencing this problem on? In particular, which processor are you using, and how much RAM do you have installed?

Also, when did you notice this slowdown started? There was a change introduced in v10.7.0 that we expected to slow down startup, but we did not anticipate that it would freeze the entire browser. Could you try v10.7.0 and v10.6.4 to see whether that's when the problem started? You can check this by disabling your current MetaMask installation, downloading the release .zip from the GitHub Releases page for this repository, and taking these steps to install it. For each version you'd want to get it into roughly the same state (i.e. import your accounts), then try restarting the browser to see if the same startup delay occurs. Once you're finished testing an older version, I'd strongly recommend deleting it and going back to the official MetaMask installation so that you continue to receive security updates.

If you don't have time to test older versions, that's OK. It can be time consuming. But it would help with the investigation, so any help you can offer would be appreciated.

One more thing that might help is sending our support team your state logs. Those will include more information and could help us reproduce this problem. You can contact support here: https://metamask.zendesk.com/hc/en-us/requests/new
See here for help on submitting state logs: https://metamask.zendesk.com/hc/en-us/articles/360015290092-How-to-download-state-logs

@brizaldi
Copy link
Author

Could you share more information about the computer you're experiencing this problem on? In particular, which processor are you using, and how much RAM do you have installed?

Intel core i5-7300HQ with 16GB RAM.

I think this happened 1-2 weeks ago, I don't remember the exact time or which version.

@Gudahtt Gudahtt added the degraded performance Issues relating to slowness of app, cpu usage, and/or blank screens. label Jan 4, 2022
@gorhill
Copy link

gorhill commented Jan 8, 2022

Since in Firefox all extensions execute in the same process, the performance issue here is causing perceived performance issue in other extensions, see https://www.reddit.com/r/uBlockOrigin/comments/ryiqst/slow_load_after_firefox_startup/.

I launched Firefox profiler then I enabled the Metamask extension, and this is the result: https://share.firefox.dev/3JPSYZV.

The expensive code appears to unconditionally execute when the Metamask JS resource (background-7.js) is loaded by Firefox. Such expensive code should be executed in a deferred manner and even better in a worker thread so as to not prevent other extensions from executing their own code to fulfill their own duty in a timely manner.

@jyooru
Copy link

jyooru commented Feb 9, 2022

I decided to look into this problem today and also found that MetaMask was causing a 5s+ startup delay in Firefox.

@dentex
Copy link

dentex commented Mar 20, 2022

Same behavior here, but I'm on Linux Mint 20.3 Una

Kernel: 5.13.0-27-generic
CPU: Quad Core Intel Core i7-4710HQ
GPU: Nvidia GeForce GTX 850M / driver: 470.103.01
RAM: 16GB
Firefox: 98.0.1
MetaMask: 10.11.1

The ~5 seconds delay is evident also upon re-enabling the MetaMask switch from about:addons tab

@altruistca
Copy link

noticed same issue here, 5+ second delay loading any site when metamask enabled and another extension that parses pages (e.g. tampermonkey).

Metamask without any parsing extensions is fine, Parsing extensions without Metamask is also fine.

Windows 10 20H2, AMD Phenom II 945
Firefox 98.0.2 with Metamask 10.11.3

@chriscarreau
Copy link

Same behavior here on Windows 10, +/- 5 seconds delay whenever I open Firefox or enable the MetaMask add-on in the settings (after having disabled it to test if it was the issue)

Windows 10 version 20H2, OS Build 19042.1620
intel i5-4690K, Nvidia EVGA GTX 960, 24Gb RAM
Firefox 99.0 (64-bit)
MetaMask version 10.11.3

@id872
Copy link

id872 commented Apr 16, 2022

I noticed the issue several month ago, but found the root cause today. Metamask addon enabled on Firefox browser slows down first page loading.
Steps to reproduce:

  1. Open firefox (with enabled metamask addon).
  2. Type google.com
  3. You should see more or less 15 seconds delay - nothing happens, and then google.com is loaded.

There is no delay when I disable metamask addon.

Metamask 10.12.4
Gentoo system updated recently
Firefox 99.0.1
i5-3320M 12GB RAM

@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot added the stale issues and PRs marked as stale label Jul 21, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

This issue was closed because there has been no follow up activity in the last 45 days. If you feel this was closed in error, please reopen and provide evidence on the latest release of the extension. Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser-firefox degraded performance Issues relating to slowness of app, cpu usage, and/or blank screens. needs-reproduction Sev2-normal Normal severity; minor loss of service or inconvenience. stale issues and PRs marked as stale type-bug
Projects
None yet
Development

No branches or pull requests

8 participants