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

plugin for firefox make it lag a lot #12479

Open
gglobot opened this issue Oct 25, 2021 · 9 comments
Open

plugin for firefox make it lag a lot #12479

gglobot opened this issue Oct 25, 2021 · 9 comments
Labels
area-performance Issues relating to slowness of app, cpu usage, and/or blank screens. browser-firefox

Comments

@gglobot
Copy link

gglobot commented Oct 25, 2021

Lag in firefox since last version
since the last update of metamask plugin for firefox, firefox become extremely laggy and very slow to respond while the metamask plugin is activated

Steps to reproduce (REQUIRED)

  1. run xmrig 1.6.12 using kapow algorithm to mine something
  2. install metamask plugin for firefox (v93.0 64-bit) under windows 10
  3. activate metamask plugin
    -> firefox become very slow to display pages, or to display plugin interface, the fox in metamask interface is extremly laggy... firefox become a real pain to use.
    Even loading web page become slow in this condition...

Expected behavior
before the last update even while mining coins with xmrig it was not laggy to use metamask under firefox.

Browser details (please complete the following information):

  • OS: window 10 64bits
  • Hardware Wallet: none
  • Browser: Firefox Browser 93.0 (64-bit)
  • MetaMask Version: 10.2.2 (last update oct. 11, 2021)

Additional context (Error Messages, etc.)
this bug might be related to Geforce drivers ... but I don't know how to confirm this.
The computer has 2 graphical cards and I was expecting firefox and metamask to use the CPU integrated graphical card.
The problem is that only firefox with metamask become laggy, no other programs or game become laggy while mining, so I assume priorities are set correctly on the computer (launching miner as background task).

@gglobot
Copy link
Author

gglobot commented Oct 25, 2021

NOTE:

To be sure I stopped the xmrig miner, but the lag remain the same while metamask plugin is activated. Plus, the graphical car does not seems to be used (under 4%) but the fox 3d animation is still lagging like hell (all firefox lag).

as soon as I deactivate metamask plugin, everything return to normal.

I also notice that while metamask plugin is loaded, there is a thread in firefox that start using about 10% of CPU playing a lot with memory with a lot of (malloc / free call)... This thread seems to be compressing a lot of data with lz4_compress.
here is a dump of the thread stacked call (catched at run time):
0 xul.dll!workerlz4_compress+0x11f188b
1 xul.dll!workerlz4_compress+0x5e258c
2 xul.dll!workerlz4_compress+0x5e2418
3 xul.dll!workerlz4_compress+0x153b2a6
4 xul.dll!workerlz4_compress+0x153e984
5 xul.dll!workerlz4_compress+0x153fa68
6 xul.dll!XRE_GetBootstrap+0x3da0b0
7 xul.dll!workerlz4_compress+0x171df9b
8 xul.dll!XRE_GetBootstrap+0x24565d
9 xul.dll!workerlz4_compress+0x93ba34
10 xul.dll!workerlz4_compress+0x51ea
11 xul.dll!workerlz4_compress+0x83a002
12 xul.dll!workerlz4_compress+0x124c9b0
13 xul.dll!workerlz4_compress+0x12165aa
14 xul.dll!XRE_GetBootstrap+0x159c54
15 xul.dll!workerlz4_compress+0x16ad013
16 xul.dll!workerlz4_compress+0x12d3a0e
17 xul.dll!XRE_GetBootstrap+0x143815
18 xul.dll!workerlz4_compress+0xd9ef1e
19 xul.dll!workerlz4_compress+0x16e7745
20 xul.dll!workerlz4_compress+0x12d3588
21 xul.dll!workerlz4_compress+0x12c9f73
22 xul.dll!workerlz4_compress+0x15ce316
23 xul.dll!workerlz4_compress+0x15c8e88
24 xul.dll!workerlz4_compress+0x12a7678
25 xul.dll!workerlz4_compress+0x12a5ed5
26 xul.dll!workerlz4_compress+0x75fbee
27 xul.dll!XRE_GetBootstrap+0x1d8775
28 xul.dll!workerlz4_compress+0x9421a0
29 xul.dll!workerlz4_compress+0x934ec5
30 xul.dll!XRE_GetBootstrap+0x1fb552
31 xul.dll!XRE_GetBootstrap+0x1fa544
32 xul.dll!XRE_GetBootstrap+0x1d4f49
33 xul.dll!workerlz4_compress+0x151ecf2
34 xul.dll!workerlz4_compress+0x14f3f67
35 xul.dll!workerlz4_compress+0x11c20b6
36 xul.dll!workerlz4_compress+0x152000d
37 xul.dll!workerlz4_compress+0x50e6bf
38 xul.dll!XRE_GetBootstrap+0x2400e
39 xul.dll!XRE_GetBootstrap+0x195d08
40 xul.dll!XRE_GetBootstrap+0x194bbf
41 xul.dll!workerlz4_compress+0xd58d6b
42 xul.dll!workerlz4_compress+0x50e6bf
43 xul.dll!XRE_GetBootstrap+0x2400e
44 xul.dll!workerlz4_compress+0xd58809
45 firefox.exe!GetNtLoaderAPI+0x6f5
46 firefox.exe!IsSandboxedProcess+0x1778
47 KERNEL32.DLL!BaseThreadInitThunk+0x14
48 ntdll.dll!RtlUserThreadStart+0x21

from what I see, the huge lag in firefox is caused by this thread that play way too much with memory, but I can't understand why it happen only when metamask plugin is loaded.
You might have more clues on this point.

@darkwing darkwing added area-performance Issues relating to slowness of app, cpu usage, and/or blank screens. browser-firefox labels Oct 27, 2021
@darkwing
Copy link
Contributor

@gglobot Could you provide minimum reproduction steps?

@gglobot
Copy link
Author

gglobot commented Oct 28, 2021

The thing is that for me, as soon as I enable metamask plugin, it start lagging.
It does not make a difference if I disable all other plugins.

It look like something is looping indefinitely in metamask... while debugging the module I can see some error message spamming the console, about 1 or 2 message per second.

it starts like this:
_details.responseHeaders is undefined 20 heuristicblocking.js:552
undefined has no properties heuristicblocking.js:552
details.responseHeaders is undefined heuristicblocking.js:552
Unchecked lastError value: Error: sender.tab is undefined clobbercookie.js:35
Unchecked lastError value: Error: sender.tab is undefined clobberlocalstorage.js:35
Unchecked lastError value: Error: sender.tab is undefined dnt.js:64
Unchecked lastError value: Error: sender.tab is undefined fingerprinting.js:342
Unchecked lastError value: Error: sender.tab is undefined collapser.js:45
Unchecked lastError value: Error: sender.tab is undefined socialwidgets.js:693
Unchecked lastError value: Error: sender.tab is undefined supercookie.js:125
Error: Can't find profile directory. 2 XULStore.jsm:66:15
can't access dead object ExtensionStorage.jsm:91
TypeError: this.cloneScope is null
ExtensionCommon.jsm:480:5
Unchecked lastError value: Error: sender.tab is undefined dnt.js:64
Unchecked lastError value: Error: sender.tab is undefined fingerprinting.js:342
Unchecked lastError value: Error: sender.tab is undefined collapser.js:45
Unchecked lastError value: Error: sender.tab is undefined socialwidgets.js:693
downloadable font: download failed (font-family: "Euclid" style:normal weight:700 stretch:100 src index:0): status=2152398850 source: moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/fonts/Euclid/EuclidCircularB-Bold-WebXL.ttf
downloadable font: download failed (font-family: "Roboto" style:normal weight:400 stretch:100 src index:2): status=2152398850 source: moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/fonts/Roboto/Roboto-Regular.ttf
sendRemoveListener on closed conduit {73a6fe31-595d-460b-a920-fcc0f8843232}.412316860428 ConduitsChild.jsm:108
Promise rejected after context unloaded: Could not establish connection. Receiving end does not exist.
Messages.js:86
sendRemoveListener on closed conduit jid1-93WyvpgvxzGATw@jetpack.412316860426 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {b9db16a4-6edc-47ec-a1f4-b86292ed211d}.412316860429 ConduitsChild.jsm:108
Promise resolved after context unloaded
8 background.js:535
Promise resolved after context unloaded
5 background.js:531
Promise resolved after context unloaded
3 background.js:535
Promise resolved after context unloaded
2 background.js:531
Promise resolved after context unloaded
8 background.js:535
Promise resolved after context unloaded
46 background.js:392
Promise resolved after context unloaded
17 background.js:535
Promise resolved after context unloaded
background.js:531
Promise resolved after context unloaded
3 background.js:535
Promise resolved after context unloaded
background.js:531
Promise resolved after context unloaded
23 background.js:535
Promise resolved after context unloaded
background.js:392
Promise resolved after context unloaded
23 background.js:535
Promise resolved after context unloaded
background.js:392
sendRemoveListener on closed conduit {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.412316860430 ConduitsChild.jsm:108
sendRemoveListener on closed conduit {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}.412316860430 ConduitsChild.jsm:108
Promise resolved after context unloaded
background-0.js:1
Setting up Sentry Remote Error Reporting for 'production': SENTRY_DSN sentry-install.js:1:970
asm.js type error: expecting argument type declaration for 'e' of the form 'arg = arg|0' or 'arg = +arg' or 'arg = fround(arg)' background-6.js:46:47000
Successfully compiled asm.js code (total compilation time 5ms) background.js
Content Security Policy: The page's settings blocked the loading of a resource at eval ("script-src"). moz-extension:2:2673768
Content Security Policy: The page's settings blocked the loading of a resource at eval ("script-src"). moz-extension:2:3324573
Content Security Policy: The page's settings blocked the loading of a resource at eval ("script-src"). moz-extension:2:3455882
Content Security Policy: The page's settings blocked the loading of a resource at eval ("script-src"). moz-extension:2:1164214
Content Security Policy: The page's settings blocked the loading of a resource at eval ("script-src"). moz-extension:2:1417733
SecurityError: Permission denied to access property "define" on cross-origin object browser-polyfill.js:2
Error: sender.page is undefined 2 undefined
uncaught exception: Object
sendRemoveListener on closed conduit French-GC@grammalecte.net.412317575790 ConduitsChild.jsm:108
Promise resolved after context unloaded
background.js:133
Promise resolved after context unloaded
background.js:134
Promise resolved after context unloaded
background.js:147
Promise resolved after context unloaded
background.js:148
Promise resolved after context unloaded
background.js:149
Promise resolved after context unloaded
background.js:150
Promise resolved after context unloaded
background.js:151
Promise resolved after context unloaded
background.js:152
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. clobbercookie.js:35
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. clobberlocalstorage.js:35
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. dnt.js:64
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. fingerprinting.js:342
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. floc.js:32
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. clobbercookie.js:35
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. clobberlocalstorage.js:35
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. dnt.js:64
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. fingerprinting.js:342
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. floc.js:32
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. collapser.js:45
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. socialwidgets.js:693
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. supercookie.js:125
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. collapser.js:45
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. socialwidgets.js:693
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. supercookie.js:125
Loading failed for the <script> with source “https://metamask.github.io/eth-ledger-bridge-keyring/bundle.js”. eth-ledger-bridge-keyring:7:1
Unchecked lastError value: Error: sender.tab is undefined clobbercookie.js:35
Unchecked lastError value: Error: sender.tab is undefined clobberlocalstorage.js:35
Unchecked lastError value: Error: sender.tab is undefined dnt.js:64
Unchecked lastError value: Error: sender.tab is undefined fingerprinting.js:342
Error: sender.page is undefined undefined
Unchecked lastError value: Error: sender.tab is undefined collapser.js:45
Unchecked lastError value: Error: sender.tab is undefined socialwidgets.js:693
Unchecked lastError value: Error: sender.tab is undefined supercookie.js:125
Uncaught (in promise) Error: Invalid tab ID: 86 undefined
Uncaught (in promise) Error: Invalid tab ID: 86 undefined
Uncaught (in promise) Error: Invalid tab ID: 85 undefined
Uncaught (in promise) Error: Invalid tab ID: 86 undefined
Uncaught (in promise) Error: Invalid tab ID: 86 undefined
Uncaught (in promise) Error: Invalid tab ID: 87 undefined
Uncaught (in promise) Error: Invalid tab ID: 87 undefined
Uncaught (in promise) Error: Invalid tab ID: 87 undefined
Uncaught (in promise) Error: Invalid tab ID: 82 undefined
Uncaught (in promise) Error: Invalid tab ID: 85 undefined
Uncaught (in promise) Error: Invalid tab ID: 81 undefined
Unchecked lastError value: Error: sender.tab is undefined dnt.js:64
Unchecked lastError value: Error: sender.tab is undefined fingerprinting.js:342
Error: sender.page is undefined undefined
Error: page is undefined undefined
Unchecked lastError value: Error: sender.tab is undefined collapser.js:45
Unchecked lastError value: Error: sender.tab is undefined socialwidgets.js:693
moz-extension://dd78781a-2933-4aa2-a7b3-b462882c6348/js/contentscripts/socialwidgets.js:693
The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page.
InvalidStateError: A mutation operation was attempted on a database that did not allow mutations. IndexedDB.jsm:120:34
Uncaught (in promise) Error: An unexpected error occurred undefined
InvalidStateError: A mutation operation was attempted on a database that did not allow mutations. 2 IndexedDB.jsm:120:34
debuggee 'moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/contentscript.js:8' would runncaught (in promise) Error: An unexpected error occurred undefined
InvalidStateError: A mutation operation was attempted on a database that did not allow mutations. IndexedDB.jsm:120:34
error setting state in local store: Error: An unexpected error occurred
_processRequest moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-0.js:1
_handle moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-0.js:1
handle moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-0.js:1
a moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/common-1.js:16
sendAsync moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/common-1.js:16
l moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/common-1.js:1
l moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/common-1.js:1
a moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/common-1.js:1
publishTransaction moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-0.js:1
_resubmitTx moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-1.js:1
resubmitPendingTxs moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-1.js:1
_onLatestBlock moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-0.js:1
n moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-0.js:1
emit moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-0.js:1
_setCurrentBlock moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-3.js:10
_newPotentialLatest moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-3.js:10
_updateLatestBlock moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-3.js:10
_synchronize moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-3.js:10
_start moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-3.js:10
_maybeStart moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-3.js:10
onNewListener moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-3.js:10
n moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-0.js:1
emit moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-0.js:1
_ moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/common-0.js:8
addListener moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/common-0.js:8
once moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/common-0.js:8
moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-0.js:1
me moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-0.js:1
moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-8.js:66
moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-8.js:66
async* moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-8.js:66
moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-8.js:66
runModule moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/runtime-cjs.js:52
entryExports moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/runtime-cjs.js:34
loadBundle moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/runtime-cjs.js:33
moz-extension://43728a93-4fbf-4416-a434-dc716a253c6b/background-8.js:1
sentry-install.js:8:36389
XHRPOSThttps://sentry.io/api/273505/store/?sentry_key=3567c198f8a8412082d32655da2961d0&sentry_version=7
[HTTP/1.1 429 Too Many Requests 436ms]
TransactionInactiveError: A request was placed against a transaction which is currently not active, or which is finished.

...
then it loop on the following messages
...
TransactionInactiveError: A request was placed against a transaction which is currently not active, or which is finished. IndexedDB.jsm:160:26
Uncaught (in promise) Error: An unexpected error occurred undefined
TransactionInactiveError: A request was placed against a transaction which is currently not active, or which is finished. IndexedDB.jsm:160:26
Uncaught (in promise) Error: An unexpected error occurred undefined
TransactionInactiveError: A request was placed against a transaction which is currently not active, or which is finished. IndexedDB.jsm:160:26
Uncaught (in promise) Error: An unexpected error occurred undefined
TransactionInactiveError: A request was placed against a transaction which is currently not active, or which is finished. IndexedDB.jsm:160:26
TransactionInactiveError: A request was placed against a transaction which is currently not active, or which is finished. 2 IndexedDB.jsm:160:26
Uncaught (in promise) Error: An unexpected error occurred undefined
TransactionInactiveError: A request was placed against a transaction which is currently not active, or which is finished. IndexedDB.jsm:160:26
Uncaught (in promise) Error: An unexpected error occurred undefined
Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. popup.html
TransactionInactiveError: A request was placed against a transaction which is currently not active, or which is finished.

This might be the cause of the lag, maybe there was a problem with my last transaction causing metamask to loop on it.
I remember I had one that was blocked and I didn't wanted to spend too much on it.... But don't remember what did I do.

@suspended
Copy link

Go to Settings > Advanced > Reset Account to see if it helps

@gglobot
Copy link
Author

gglobot commented Nov 7, 2021

Yes this helped ... since I reset, everything is fine now.
Thanks

@ctp9
Copy link

ctp9 commented Dec 19, 2021

Here to confirm that this is still an issue - even on a fresh install of Firefox (latest) with a newly created MetaMask account.

Websites become extremely slow to load with the extension enabled. Once the extension is disabled - webpage loading speed goes back to normal (very fast).

Slow website loading speed can be mostly observed upon initially opening Firefox and attempting to visit any URL. The first page you try to visit will take up to 5-10 seconds to process before it begins rendering the page. Once MetaMask extension is disabled and Firefox is restarted - the first web page gets loaded almost instantly and without any delays.

@riegeo
Copy link

riegeo commented Jan 10, 2022

I can confirm, that MetaMask Extension slows down Firefox. I had to deactivate the extension in order to work with firefox. The first few pages load normal, then it takes very long to load even simple pages. After restarting Firefox game starts all over again.

I even did reset all adjustments in Firefox, with no luck.

@Rescue9
Copy link

Rescue9 commented Apr 20, 2022

Confirming this is still an issue. Fresh install 4/19/22 using version 10.12.4. Took almost 45 seconds for me to load the first search page of Cars.com. Also noticeable if you have the Momentum home page extension installed. First launch of Firefox takes seconds to load the home screen when MetaMask extension active. Disabling extension causes zero lag time during loading.

@saelic
Copy link

saelic commented Jun 13, 2022

I believe that this is connected to: piroor/treestyletab#3130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-performance Issues relating to slowness of app, cpu usage, and/or blank screens. browser-firefox
Projects
Status: To be fixed
Development

No branches or pull requests

7 participants