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

Metasuites slows down browser #31

Open
AJolly opened this issue Jul 13, 2024 · 6 comments
Open

Metasuites slows down browser #31

AJolly opened this issue Jul 13, 2024 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@AJolly
Copy link

AJolly commented Jul 13, 2024

I love the extension, but I recently realized just how much it slows my computer down -
Installing Metasuite slows down my browser by around 20%
Testing using - https://browserbench.org/Speedometer3.0

By default it seems to load itself into every webpage, causing the slowdown.

@Philx0
Copy link

Philx0 commented Jul 18, 2024

I cannot comment any slowdowns.
This is my setup:
Assuming chrome:
Manage extensions -> metadock -> Site access -> On specific sites
pin the extension to the toolbar, go to eg etherscan right click and in 'this can read and change site data', select 'on etherscan.io'
Does that help?

@cong1223
Copy link
Contributor

Thanks for the feedback, we'll take it to heart and bust our humps to make some improvements.

@AJolly
Copy link
Author

AJolly commented Jul 19, 2024

I cannot comment any slowdowns. This is my setup: Assuming chrome: Manage extensions -> metadock -> Site access -> On specific sites pin the extension to the toolbar, go to eg etherscan right click and in 'this can read and change site data', select 'on etherscan.io' Does that help?

Yes that makes a huge difference and that's how I have got it configured now. However given the extension already knows which sites it should be active on, there's no reason a user should have to configure that manually.

Glancing through the build config, it seems like the dev version doesn't. But I was unable to get it to successfully compile on my end.

(It was surprising to me to realize just how much different extensions can slow down the entire browser, and I'm on the fastest PC out there - 14900ks with an optane SSD)

@cong1223
Copy link
Contributor

One approach to solving this problem is to conditionally insert styles as needed, with the general idea as follows:

export const getStyle = () => {
  const style = document.createElement("style")
  style.textContent = cssText
  return style
}

This will require some effort and a significant amount of time, but I will be making efforts in this direction, and I also welcome contributions from other developers in the form of pull requests.

@0xbe37e 0xbe37e added the help wanted Extra attention is needed label Jul 22, 2024
@AJolly
Copy link
Author

AJolly commented Aug 2, 2024

Shouldn't just changing the manifest.json be enough?

The dist versions manifest.json:
"content_scripts": [ { "all_frames": true, "css": [ "bundle/index.30923be7.css", "bundle/index.b2967aa4.css", "bundle/index.all_frames.9b49128c.css" ], "js": [ "bundle/index.all_frames.ts-loader.e969248d.js" ], "matches": [ "\u003Call_urls>" ] }, { "all_frames": false, "css": [ "bundle/index.30923be7.css", "bundle/index.b2967aa4.css", "bundle/index.e55f0b06.css" ], "js": [ "bundle/index.ts-loader.64b5cf4e.js" ], "matches": [ "\u003Call_urls>" ] } ],

Vs if we change it to this, the slowdown issues go away:
"content_scripts": [ { "all_frames": true, "css": [ "bundle/index.30923be7.css", "bundle/index.b2967aa4.css", "bundle/index.all_frames.9b49128c.css" ], "js": [ "bundle/index.all_frames.ts-loader.e969248d.js" ], "matches": [ "*://*.etherscan.io/*", "*://*.etherscan.com/*", "*://*.bscscan.com/*", "*://*.polygonscan.com/*", "*://optimistic.etherscan.io/*", "*://*.arbiscan.io/*", "*://*.ftmscan.com/*", "*://cronoscan.com/*", "*://*.moonscan.io/*", "*://*.basescan.org/*", "*://*.lineascan.build/*", "*://*.wemixscan.com/*", "*://gnosisscan.io/*", "*://*.celoscan.io/*", "*://*.bttcscan.com/*", "*://era.zksync.network/*", "*://snowscan.xyz/*", "*://*.btc.com/*", "*://*.opensea.io/*", "*://*.tronscan.org/*", "*://scan.merlinchain.io/*", "*://solscan.io/*", "*://*.solana.fm/*", "*://*.metasleuth.io/*", "*://explorer.solana.com/*", "*://debank.com/*", "*://platform.arkhamintelligence.com/*", "*://explorer.jito.wtf/*" ] }, { "all_frames": false, "css": [ "bundle/index.30923be7.css", "bundle/index.b2967aa4.css", "bundle/index.e55f0b06.css" ], "js": [ "bundle/index.ts-loader.64b5cf4e.js" ], "matches": [ "*://*.etherscan.io/*", "*://*.etherscan.com/*", "*://*.bscscan.com/*", "*://*.polygonscan.com/*", "*://optimistic.etherscan.io/*", "*://*.arbiscan.io/*", "*://*.ftmscan.com/*", "*://cronoscan.com/*", "*://*.moonscan.io/*", "*://*.basescan.org/*", "*://*.lineascan.build/*", "*://*.wemixscan.com/*", "*://gnosisscan.io/*", "*://*.celoscan.io/*", "*://*.bttcscan.com/*", "*://era.zksync.network/*", "*://snowscan.xyz/*", "*://*.btc.com/*", "*://*.opensea.io/*", "*://*.tronscan.org/*", "*://scan.merlinchain.io/*", "*://solscan.io/*", "*://*.solana.fm/*", "*://*.metasleuth.io/*", "*://explorer.solana.com/*", "*://debank.com/*", "*://platform.arkhamintelligence.com/*", "*://explorer.jito.wtf/*" ] } ], "description": "Integrating 30+ popular Web3 and AI Tools, 300M+ Address Labels, and the Fund Flow Map into a single extension.", "host_permissions": [ "*://*.etherscan.io/*", "*://*.etherscan.com/*", "*://*.bscscan.com/*", "*://*.polygonscan.com/*", "*://optimistic.etherscan.io/*", "*://*.arbiscan.io/*", "*://*.ftmscan.com/*", "*://cronoscan.com/*", "*://*.moonscan.io/*", "*://*.basescan.org/*", "*://*.lineascan.build/*", "*://*.wemixscan.com/*", "*://gnosisscan.io/*", "*://*.celoscan.io/*", "*://*.bttcscan.com/*", "*://era.zksync.network/*", "*://snowscan.xyz/*", "*://*.btc.com/*", "*://*.opensea.io/*", "*://*.tronscan.org/*", "*://scan.merlinchain.io/*", "*://solscan.io/*", "*://*.solana.fm/*", "*://*.metasleuth.io/*", "*://explorer.solana.com/*", "*://debank.com/*", "*://platform.arkhamintelligence.com/*", "*://explorer.jito.wtf/*" ],

@cong1223
Copy link
Contributor

cong1223 commented Aug 6, 2024

Shouldn't just changing the manifest.json be enough?

The dist versions manifest.json: "content_scripts": [ { "all_frames": true, "css": [ "bundle/index.30923be7.css", "bundle/index.b2967aa4.css", "bundle/index.all_frames.9b49128c.css" ], "js": [ "bundle/index.all_frames.ts-loader.e969248d.js" ], "matches": [ "\u003Call_urls>" ] }, { "all_frames": false, "css": [ "bundle/index.30923be7.css", "bundle/index.b2967aa4.css", "bundle/index.e55f0b06.css" ], "js": [ "bundle/index.ts-loader.64b5cf4e.js" ], "matches": [ "\u003Call_urls>" ] } ],

Vs if we change it to this, the slowdown issues go away: "content_scripts": [ { "all_frames": true, "css": [ "bundle/index.30923be7.css", "bundle/index.b2967aa4.css", "bundle/index.all_frames.9b49128c.css" ], "js": [ "bundle/index.all_frames.ts-loader.e969248d.js" ], "matches": [ "*://*.etherscan.io/*", "*://*.etherscan.com/*", "*://*.bscscan.com/*", "*://*.polygonscan.com/*", "*://optimistic.etherscan.io/*", "*://*.arbiscan.io/*", "*://*.ftmscan.com/*", "*://cronoscan.com/*", "*://*.moonscan.io/*", "*://*.basescan.org/*", "*://*.lineascan.build/*", "*://*.wemixscan.com/*", "*://gnosisscan.io/*", "*://*.celoscan.io/*", "*://*.bttcscan.com/*", "*://era.zksync.network/*", "*://snowscan.xyz/*", "*://*.btc.com/*", "*://*.opensea.io/*", "*://*.tronscan.org/*", "*://scan.merlinchain.io/*", "*://solscan.io/*", "*://*.solana.fm/*", "*://*.metasleuth.io/*", "*://explorer.solana.com/*", "*://debank.com/*", "*://platform.arkhamintelligence.com/*", "*://explorer.jito.wtf/*" ] }, { "all_frames": false, "css": [ "bundle/index.30923be7.css", "bundle/index.b2967aa4.css", "bundle/index.e55f0b06.css" ], "js": [ "bundle/index.ts-loader.64b5cf4e.js" ], "matches": [ "*://*.etherscan.io/*", "*://*.etherscan.com/*", "*://*.bscscan.com/*", "*://*.polygonscan.com/*", "*://optimistic.etherscan.io/*", "*://*.arbiscan.io/*", "*://*.ftmscan.com/*", "*://cronoscan.com/*", "*://*.moonscan.io/*", "*://*.basescan.org/*", "*://*.lineascan.build/*", "*://*.wemixscan.com/*", "*://gnosisscan.io/*", "*://*.celoscan.io/*", "*://*.bttcscan.com/*", "*://era.zksync.network/*", "*://snowscan.xyz/*", "*://*.btc.com/*", "*://*.opensea.io/*", "*://*.tronscan.org/*", "*://scan.merlinchain.io/*", "*://solscan.io/*", "*://*.solana.fm/*", "*://*.metasleuth.io/*", "*://explorer.solana.com/*", "*://debank.com/*", "*://platform.arkhamintelligence.com/*", "*://explorer.jito.wtf/*" ] } ], "description": "Integrating 30+ popular Web3 and AI Tools, 300M+ Address Labels, and the Fund Flow Map into a single extension.", "host_permissions": [ "*://*.etherscan.io/*", "*://*.etherscan.com/*", "*://*.bscscan.com/*", "*://*.polygonscan.com/*", "*://optimistic.etherscan.io/*", "*://*.arbiscan.io/*", "*://*.ftmscan.com/*", "*://cronoscan.com/*", "*://*.moonscan.io/*", "*://*.basescan.org/*", "*://*.lineascan.build/*", "*://*.wemixscan.com/*", "*://gnosisscan.io/*", "*://*.celoscan.io/*", "*://*.bttcscan.com/*", "*://era.zksync.network/*", "*://snowscan.xyz/*", "*://*.btc.com/*", "*://*.opensea.io/*", "*://*.tronscan.org/*", "*://scan.merlinchain.io/*", "*://solscan.io/*", "*://*.solana.fm/*", "*://*.metasleuth.io/*", "*://explorer.solana.com/*", "*://debank.com/*", "*://platform.arkhamintelligence.com/*", "*://explorer.jito.wtf/*" ],

The downside to this solution is that every time we need to adapt the extension for a new website, we have to modify the extension's permissions, which ends up causing users to panic.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants