pixiebrix-extension icon indicating copy to clipboard operation
pixiebrix-extension copied to clipboard

MV3 sidebar loads very slowly and shows black panel when toggling from toolbar

Open twschiller opened this issue 1 year ago • 17 comments

Describe the bug

  • MV3 sidebar shows black instead of loading html when toggling from toolbar
  • Time varies: can sometimes show for 1+ seconds
  • I'm on an M1 with plenty of CPU/RAM, so flagging that because it will likely be worse for other users

To Reproduce

Steps to reproduce the behavior:

  1. Go to a web page
  2. Toggle the MV3 sidebar

Actual behavior

  • Shows black for a period of time
  • @MMirandi is seeing the same thing. But it's purple due to the theme in his browser. Screenshot: https://www.notion.so/pixiebrix/6b648ffe73894eb4ad0b692bbc0c2f91?pvs=4#043e9aa46ecd4ba1b85e93317e0c1b45

Expected behavior

  • Quickly shows loading message: https://github.com/pixiebrix/pixiebrix-extension/blob/733719b0a8f55f9f3160b0279b09a103714edc36/src/sidebar/sidebar.html#L34-L34
  • Quickly loads sidebar

Screenshots/Loom

  • Time varies: can sometimes show for 2+ seconds. Not too bad in this video:
  • https://www.loom.com/share/208f9b589d9541b7b3c70773b81db422?sid=70d5eb6f-fbdb-4be0-9fa9-7a48fb5fae2d

Discussion/Diagnosis

  • Potentially messenger or cache related? Seems to be slowest after updating local extension
  • Closing and reopening it load faster
  • Related code: https://github.com/pixiebrix/pixiebrix-extension/blob/733719b0a8f55f9f3160b0279b09a103714edc36/src/background/browserAction.ts#L74-L74
  • I've seen the issue on Chrome but not really on MS Edge, so might be a Chrome performance issue
  • You might check the Chrome Developers mailing list to see if other people have reported

Desktop (please complete the following information):

  • OS: Mac
  • Browser: Chrome
  • Extension Version: 1.8.12-alpha.2-mv3

twschiller avatar Apr 05 '24 13:04 twschiller