metasuites icon indicating copy to clipboard operation
metasuites copied to clipboard

Metasuites slows down browser

Open AJolly opened this issue 1 year ago • 6 comments

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.

AJolly avatar Jul 13 '24 05:07 AJolly

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?

Philx0 avatar Jul 18 '24 13:07 Philx0

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

cong1223 avatar Jul 19 '24 01:07 cong1223

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)

AJolly avatar Jul 19 '24 16:07 AJolly

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.

cong1223 avatar Jul 22 '24 06:07 cong1223

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/*" ],

AJolly avatar Aug 02 '24 18:08 AJolly

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

cong1223 avatar Aug 06 '24 08:08 cong1223