| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Keep extension service workers out of EcoQoS on Windows
Extension service workers can be left at background process priority
(EcoQoS on Windows). Under heavy system load their render process then
starves and cannot finish top-level script evaluation before the service
worker start timeout (kStartInstalledWorkerTimeout); the worker is torn
down and retried indefinitely. For force-installed extensions with
webRequestBlocking (e.g. enterprise DLP), this can block navigation for
minutes.Q: You mention windows, but I don't see any windows specific code. Is this expected?
Both features are gated so they can be disabled via Finch if needed.The part in content adding "has_foreground_service_worker" checks isn't under the flags. Does this sentence still holds?
#if !BUILDFLAG(IS_ANDROID)Can I defer content/ review to @pmon...@chromium.org ?
(If yes, feel free to close once the review is done, and I will stamp the approved patch)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Keep extension service workers out of EcoQoS on Windows
Extension service workers can be left at background process priority
(EcoQoS on Windows). Under heavy system load their render process then
starves and cannot finish top-level script evaluation before the service
worker start timeout (kStartInstalledWorkerTimeout); the worker is torn
down and retried indefinitely. For force-installed extensions with
webRequestBlocking (e.g. enterprise DLP), this can block navigation for
minutes.Q: You mention windows, but I don't see any windows specific code. Is this expected?
The changes are not locked down to just Windows but the issue with service worker extensions at lowest priority is an issue on all platforms.
Both features are gated so they can be disabled via Finch if needed.The part in content adding "has_foreground_service_worker" checks isn't under the flags. Does this sentence still holds?
This refers to kExtensionServiceWorkerVoter and kServiceWorkerForegroundOnExtensionStartup. The addition of the has_foreground_service_worker checks resolves a bug where this was not done in the override case.
#if !BUILDFLAG(IS_ANDROID)Can I defer content/ review to @pmon...@chromium.org ?
(If yes, feel free to close once the review is done, and I will stamp the approved patch)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Keep extension service workers out of EcoQoS on Windows
Extension service workers can be left at background process priority
(EcoQoS on Windows). Under heavy system load their render process then
starves and cannot finish top-level script evaluation before the service
worker start timeout (kStartInstalledWorkerTimeout); the worker is torn
down and retried indefinitely. For force-installed extensions with
webRequestBlocking (e.g. enterprise DLP), this can block navigation for
minutes.Chris DavisQ: You mention windows, but I don't see any windows specific code. Is this expected?
The changes are not locked down to just Windows but the issue with service worker extensions at lowest priority is an issue on all platforms.
Thanks!
#if !BUILDFLAG(IS_ANDROID)Chris DavisCan I defer content/ review to @pmon...@chromium.org ?
(If yes, feel free to close once the review is done, and I will stamp the approved patch)
That's fine.
Okay. I am keeping it open until this get reviewed. Feel free to close once this is done to give visibility back to me.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
lgtm
and only covers workers that already have a WorkerNode. During the
critical kStarting window there is no worker node or vote yet, so the
render process falls to background priority and starves.This is really a major flaw of the priority system in the performance manager. Unfortunately I don't have time to fix it right away.
I'd love to have worker nodes created before they start so we could apply a priority as soon as possible.
#if !BUILDFLAG(IS_ANDROID)Chris DavisCan I defer content/ review to @pmon...@chromium.org ?
(If yes, feel free to close once the review is done, and I will stamp the approved patch)
Arthur SonzogniThat's fine.
Okay. I am keeping it open until this get reviewed. Feel free to close once this is done to give visibility back to me.
It's adding a tiny bit more tech debt but there's already some there that I need to address anyways in the future. I think this is okay.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
BASE_FEATURE(kExtensionServiceWorkerVoter, base::FEATURE_ENABLED_BY_DEFAULT);We shouldn't enable this until https://crbug.com/493556675 is resolved. We're currently at 50% of stable. Hopefully this will be enabled by default in the next couple weeks once the analysis completes.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
BASE_FEATURE(kExtensionServiceWorkerVoter, base::FEATURE_ENABLED_BY_DEFAULT);We shouldn't enable this until https://crbug.com/493556675 is resolved. We're currently at 50% of stable. Hopefully this will be enabled by default in the next couple weeks once the analysis completes.
This is currently blocking a large number of companies in bug 484218883.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
BASE_FEATURE(kExtensionServiceWorkerVoter, base::FEATURE_ENABLED_BY_DEFAULT);Chris DavisWe shouldn't enable this until https://crbug.com/493556675 is resolved. We're currently at 50% of stable. Hopefully this will be enabled by default in the next couple weeks once the analysis completes.
This is currently blocking a large number of companies in bug 484218883.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
BASE_FEATURE(kExtensionServiceWorkerVoter, base::FEATURE_ENABLED_BY_DEFAULT);Chris DavisWe shouldn't enable this until https://crbug.com/493556675 is resolved. We're currently at 50% of stable. Hopefully this will be enabled by default in the next couple weeks once the analysis completes.
Justin LulejianThis is currently blocking a large number of companies in bug 484218883.
@rdevlin...@chromium.org FYI.
Also something to consider is that not all enterprises enable Finch so reverting this will require merging back changes to address those users.
BASE_FEATURE(kExtensionServiceWorkerVoter, base::FEATURE_ENABLED_BY_DEFAULT);Chris DavisWe shouldn't enable this until https://crbug.com/493556675 is resolved. We're currently at 50% of stable. Hopefully this will be enabled by default in the next couple weeks once the analysis completes.
Justin LulejianThis is currently blocking a large number of companies in bug 484218883.
Justin Lulejian@rdevlin...@chromium.org FYI.
Also something to consider is that not all enterprises enable Finch so reverting this will require merging back changes to address those users.
After speaking with Devlin I'll retract this request since we're still a couple week away from branch cut. We should have some metrics by then to decide whether to revert this default enable.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
+yyanagisawa@: Can you review this CL on behalf of me?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
This is actually for the extension service worker, I would like to delegate the decision to the extension folks. lgtm if the are fine.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
script_url_.SchemeIs("chrome-extension")) {Hmm, this seems like a layering violation. content/ shouldn't know about the chrome-extension scheme or be checking it directly like this.
Can this check go up to the content embedder through a new ContentBrowserClient API? Ideally, the feature flags would also be declared and checked in the chrome/ layer.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hmm, this seems like a layering violation. content/ shouldn't know about the chrome-extension scheme or be checking it directly like this.
Can this check go up to the content embedder through a new ContentBrowserClient API? Ideally, the feature flags would also be declared and checked in the chrome/ layer.
Done — moved the check behind a new ContentBrowserClient::ShouldServiceWorkerRequireForegroundPriorityDuringStartup() .  content/ keeps only the  kStarting gate;  ChromeContentBrowserClient does the  extensions::kExtensionScheme check and the feature flag now lives in  chrome/common/chrome_features.h .
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
CONTENT_EXPORT BASE_DECLARE_FEATURE(kServiceWorkerForegroundOnExtensionStartup);Can this be removed now, since the feature has moved to chrome/?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
CONTENT_EXPORT BASE_DECLARE_FEATURE(kServiceWorkerForegroundOnExtensionStartup);Can this be removed now, since the feature has moved to chrome/?
Thanks. Looks like I reintroduced it while resolving a conflict during rebase.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Keep extension service workers out of EcoQoS on Windows
Extension service workers can be left at background process priority
(EcoQoS on Windows). Under heavy system load their render process then
starves and cannot finish top-level script evaluation before the service
worker start timeout (kStartInstalledWorkerTimeout); the worker is torn
down and retried indefinitely. For force-installed extensions with
webRequestBlocking (e.g. enterprise DLP), this can block navigation for
minutes.
ExtensionServiceWorkerVoter already votes USER_BLOCKING for extension
(chrome-extension) service worker nodes, but it was disabled by default
and only covers workers that already have a WorkerNode. During the
critical kStarting window there is no worker node or vote yet, so the
render process falls to background priority and starves.
This CL keeps extension service workers at foreground priority for both
the starting and running states, then hands priority back to the normal
signals once startup completes:
- Enable ExtensionServiceWorkerVoter by default so running
chrome-extension service workers get a USER_BLOCKING vote and no
longer drop to background/EcoQoS.
- Add a ContentBrowserClient hook,
ShouldServiceWorkerRequireForegroundPriorityDuringStartup(script_url).
content/ calls it while a worker is kStarting but stays agnostic of
the chrome-extension scheme; ChromeContentBrowserClient implements the
policy (extension scheme + feature check). This covers the gap the
voter cannot (no worker node yet during startup).
- Declare and check the feature in the chrome/ layer:
features::kServiceWorkerForegroundOnExtensionStartup now lives in
chrome/common/chrome_features.{h,cc} instead of content/common.
- Honor has_foreground_service_worker under a Performance Manager
priority override. RenderProcessPriority::is_background() and
GetProcessPriority() previously ignored the flag whenever a
priority_override was present, which silently defeated the boost.
- Re-evaluate priority when startup finishes.
EmbeddedWorkerInstance::OnStarted() now calls UpdateForegroundPriority(),
dropping the temporary startup boost once the worker reaches kRunning
(it is likewise released when the worker stops).
Both features are gated so they can be disabled via Finch if needed.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
BASE_FEATURE(kExtensionServiceWorkerVoter, base::FEATURE_ENABLED_BY_DEFAULT);Chris DavisWe shouldn't enable this until https://crbug.com/493556675 is resolved. We're currently at 50% of stable. Hopefully this will be enabled by default in the next couple weeks once the analysis completes.
Justin LulejianThis is currently blocking a large number of companies in bug 484218883.
Justin Lulejian@rdevlin...@chromium.org FYI.
Justin LulejianAlso something to consider is that not all enterprises enable Finch so reverting this will require merging back changes to address those users.
After speaking with Devlin I'll retract this request since we're still a couple week away from branch cut. We should have some metrics by then to decide whether to revert this default enable.
@Justin - can you disable the experiment you are running? I think it is setting kExtensionServiceWorkerVoter disabled for some people that are trying to verify the fix in Canary.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
BASE_FEATURE(kExtensionServiceWorkerVoter, base::FEATURE_ENABLED_BY_DEFAULT);Chris DavisWe shouldn't enable this until https://crbug.com/493556675 is resolved. We're currently at 50% of stable. Hopefully this will be enabled by default in the next couple weeks once the analysis completes.
Justin LulejianThis is currently blocking a large number of companies in bug 484218883.
Justin Lulejian@rdevlin...@chromium.org FYI.
Justin LulejianAlso something to consider is that not all enterprises enable Finch so reverting this will require merging back changes to address those users.
Chris DavisAfter speaking with Devlin I'll retract this request since we're still a couple week away from branch cut. We should have some metrics by then to decide whether to revert this default enable.
@Justin - can you disable the experiment you are running? I think it is setting kExtensionServiceWorkerVoter disabled for some people that are trying to verify the fix in Canary.
That is possible but it would severely impact some experiment data. Before doing that could the people trying to verify the fix in canary try passing `--enable-features==ExtensionServiceWorkerVoter` to `chrome` forcibly enable it?
BASE_FEATURE(kExtensionServiceWorkerVoter, base::FEATURE_ENABLED_BY_DEFAULT);Chris DavisWe shouldn't enable this until https://crbug.com/493556675 is resolved. We're currently at 50% of stable. Hopefully this will be enabled by default in the next couple weeks once the analysis completes.
Justin LulejianThis is currently blocking a large number of companies in bug 484218883.
Justin Lulejian@rdevlin...@chromium.org FYI.
Justin LulejianAlso something to consider is that not all enterprises enable Finch so reverting this will require merging back changes to address those users.
Chris DavisAfter speaking with Devlin I'll retract this request since we're still a couple week away from branch cut. We should have some metrics by then to decide whether to revert this default enable.
Justin Lulejian@Justin - can you disable the experiment you are running? I think it is setting kExtensionServiceWorkerVoter disabled for some people that are trying to verify the fix in Canary.
That is possible but it would severely impact some experiment data. Before doing that could the people trying to verify the fix in canary try passing `--enable-features==ExtensionServiceWorkerVoter` to `chrome` forcibly enable it?
That is what I had them do to verify the fix.