Will Manifest V3 allow this functionality? - Hans
When this functionality is put together with the "background" permission, it allows scripts to persist even after all tabs and windows have been closed. - Hans
Hans, I have some thoughts about your GUI. - Simeon
I wonder if ManifestV3 could somehow make use of SharedWorker... - wOxxOm
I've read more than once about this theory that the extensions team doesn't have the time to keep maintaining the background-page functionality. - Getfree
There's no reason for such a simple feature to have significant maintenance cost.
By removing the background page they are probably hoping to save some RAM in the user's computer. Other than that I see no benefit at all. - Getfree
--
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/c87e56bc-37d4-4e98-aa2d-e4ad7c68b67bo%40chromium.org.
I will probably have to overcome my laziness and open an issue on the bug tracker to obliterate the notion with facts.
your GUI is interesting because it looks like it fits well into the pattern of using config rather than code. If you are using config to drive a state machine or other internal logic at runtime, this should work within Manifest V3's remotely hosted code restrictions. If you're dynamically constructing a string that's evaled at runtime… well, you'll need to keep an eye out for updates.
But then we have to add the time necessary to load, parse and execute 27 Javascript files (which is what we use in the background page right now). And on top of that the time needed to reload the extension state from storage. And only then we can respond to the user's shortcut.
the switch was made mainly to simplify the source code of Chromium, AFAICT - wOxxOm
--
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/c126c461-62f1-43ba-903b-9271474eb5cen%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/ddbd136c-22ee-4525-8919-bae8aa863488n%40chromium.org.
The problem I have with MV3 is that its proponents claim without any tangible proof the persistent use case is non-existent or negligible. - wOxxOm
Will libraries like webext-redux become non-tenable without a persistent background page? - Stephen
My biggest fear is that chrome extension authors will be forced to undertake extensive rewrites. … the v3 upgrade may be akin to a framework rewrite - Stephen
--
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/b3a81a4d-5a9a-43c7-b46d-7214ec37fe63n%40chromium.org.
I see the official blog is still making the same unsubstantiated claims that are actually exaggerations bordering on lies:> persistent background pages, which remain active in the background and consume system resources regardless of whether the extension is actively using themNo, usually a persistent background page is just idling, doing nothing. Yes, it occupies 20-50MB of RAM, sometimes more, but that's just a fraction of a typical modern web page so the point about it consuming system resources is an exaggeration and the bit about "active in the background" would apply only to rare cases when the extension has a bug or it was written by a clueless author, which means such problem affects only a negligible amount of users typically. Extensions don't do anything at all once they've registered event listeners normally. Either way, extensions are a part of the browser so it's only natural to allocate this tiny bit of RAM to keep them ready to start with zero delay so they can augment and extend the browser seamlessly like a so-called "native application" is supposed to do.> service workers are ephemeral [which] allows Chrome to lower overall system resource utilization since the browser can start up and tear down service workers as needed.This is a common misunderstanding shared by a lot of web developers who don't understand the specifics of extensions. Apparently, the PR team is trying too hard to find something goodish and blow it up to justify ManifestV3 changes. Let's look at what really happens when a background service worker of an extension starts. We'll be using chrome://tracing, devtools profiler, and simple performance.now() timing.
- A new process for JS environment is created and a V8 snapshot with standard JS built-ins is initialized. That's 50-100ms already.
- The extension background scripts are parsed, compiled, executed. Depending on extension that would be 10 - 500ms, typically 100ms. Chrome doesn't cache extension scripts to avoid potential privilege escalation via side-channel attacks so each time the scripts are parsed and compiled anew.
- The extension initializes and restores its state. Depending on extension that would be another 10 - 500ms, typically 100ms.
How bad is it?It's 70-1000ms (typically 100-200ms) of super intense activity with nearly 100% CPU utilization in the extension process and this happens each time the background worker is needed. For many extensions that react to user activity (like page navigation when the user clicks a link) this could happen each minute or hundreds of times a day. The amount of system resources burnt by starting up these extensions might be millions of times bigger than passive idling of the persistent background pages that don't do anything "active in the background" but run only a small amount of code in the idling event listeners when an event occurs.> Second, we are moving to a more declarative model for extension APIs in general. In addition to security benefits, this provides a more reliable end-user performance guarantee across the board by eliminating the need for serialization and inter-process communication. The end result is better overall performance and improved privacy guarantees for the vast majority of extension users.Again, an unsubstantiated claim and a huge exaggeration aimed at people who don't have a lot of experience in programming. The real benefit will be negligible, like 0.01%, for almost every extension in almost every usage scenario except a few extremely rare cases where serialization and IPC become noticeable.Back to the problem of restarting the extension too often. It is immediately obvious to anyone who understands how computers work but it's only recently that I've encountered the first public evidence that at least one Chromium developer understands it too, see https://crrev.com/c/2510431. It's good seeing practical-minded people making practical decisions, isn't it? Now I wonder is it too much to hope for the PR team to stop the blatant propaganda about how good ManifestV3 will be for everyone? Because it won't be. The benefits will be negligible in most cases, like in 99% of cases. Admittedly, the downsides will be also rare but for many extensions and usage scenarios there'll be no way to provide meaningful experience. And for what? To reiterate, the reasons given so far publicly are all unsubstantiated claims or exaggerations.