Manifest v3 High CPU Usages

387 views
Skip to first unread message

daniel k

unread,
Jan 21, 2022, 10:25:09 PM1/21/22
to Chromium Extensions
When I send message (from contents script to background),
"browser" CPU usages is over 100% from Chrome task manager (not window task manager)
extension CPU is okay but "browser" goes high


Bellow code is what i tested
https://github.com/ttop32/testChromeMessage
```
document.addEventListener("visibilitychange", function() {
  if (document.visibilityState === "hidden") {
    for (let i = 0; i < 1000; i++) {
        sendMessage();
    }                                                                                  
  }
});


function sendMessage() {
  chrome.runtime.sendMessage({
      type: 'message'
    },
    function(data) {}
  );
}
```


Add extension and refresh site few times makes High CPU Usages
It goes back when turn off extension



In my thought, send message then close makes ruined task

wOxxOm

unread,
Jan 22, 2022, 9:16:21 AM1/22/22
to Chromium Extensions, tto...@gmail.com
Confirming the problem and also confirming there's no such problem in MV2 if I edit manifest.json:

  "manifest_version": 2,
  "background": {"scripts": ["background.js"]}

Might be related to https://crbug.com/1231683 but you should probably open a new bug report and don't forget to mention there's no problem in MV2 + background script.

This is yet another evidence that MV3 is nowhere near being stable even now, and it was a barely functional prototype when it was officially considered stable in Chrome 88 a year ago. This is the first time I closely observe a big corporation blatantly lying to everyone and still getting away with it.

Jorge Dardon

unread,
Jan 23, 2022, 6:25:18 PM1/23/22
to Chromium Extensions, wOxxOm
I'm aware that manifest V2 is going to be nuked in about a year, so our only option is V3.
As much as nobody really wants this change.
Is it really a mess in general, or more so in edge cases? 

Cuyler Stuwe

unread,
Jan 23, 2022, 6:26:25 PM1/23/22
to Jorge Dardon, Chromium Extensions, wOxxOm
It’s a mess.

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/0ad7e142-976a-4357-97cd-46e8b187473an%40chromium.org.

hrg...@gmail.com

unread,
Jan 23, 2022, 7:34:42 PM1/23/22
to Chromium Extensions, jdar...@gmail.com, wOxxOm

Is it really a mess in general, or more so in edge cases? 

Many bugs and missing features makes MV3 unusable at the moment.

The bad news is that it seems unlikely that all those bugs and missing features are solved during this year. The Extensions Team is moving too slow.
In all likelyhood, we'll be forced to migrate to a broken platform as the end of this year approaches.
 

Jorge Dardon

unread,
Jan 23, 2022, 7:38:43 PM1/23/22
to Chromium Extensions, hrg...@gmail.com, Jorge Dardon, wOxxOm
silly me for planning a software service for months and having an irreplaceable core usage be a chrome extension then.

Cuyler Stuwe

unread,
Jan 23, 2022, 7:40:29 PM1/23/22
to Jorge Dardon, Chromium Extensions, hrg...@gmail.com, wOxxOm
At least you haven’t built your entire career around specializing in Chrome extensions! 😅

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.

Simeon Vincent

unread,
Mar 2, 2022, 4:46:31 PM3/2/22
to Cuyler Stuwe, Jorge Dardon, Chromium Extensions, hrg...@gmail.com, wOxxOm
FYI, issue 1189678 has been resolved and merged into the M99 release branch. 

Simeon - @dotproto
Chrome Extensions DevRel


Cuyler Stuwe

unread,
Mar 2, 2022, 6:15:37 PM3/2/22
to Simeon Vincent, Chromium Extensions, Jorge Dardon, hrg...@gmail.com, wOxxOm
Is that issue related to this CPU issue at all…? 🤔

Simeon Vincent

unread,
Mar 14, 2022, 9:00:04 PM3/14/22
to Cuyler Stuwe, Chromium Extensions, Jorge Dardon, hrg...@gmail.com, wOxxOm
Whoops, wrong issue. Meant to link to https://crbug.com/1231683. Sorry about that!

Simeon - @dotproto
Chrome Extensions DevRel

Reply all
Reply to author
Forward
0 new messages