Prevent system sleep when an upload has recently been started when the network service is enabled. |
||||||
Issue descriptionWakeLockResourceThrottle prevents entering sleep for first 30 seconds of an upload. The network service doesn't use ResourceThrottles, so requests bypass it when the service is in use. We should find a way to enable similar (Possibly better) behavior when the network service is enabled.
,
May 18 2018
,
Jul 11
,
Jul 11
The description is actually wrong - WakeLockResourceThrottle prevents entering sleep *after* the first 30 seconds of an upload, until the upload is complete.
,
Jul 11
Matt, I am not sure that this should block the initial roll out to canary, but should block the roll out to 100%, wdyt?
,
Jul 11
I suspect usage is low enough that it shouldn't block Canary rollout (It's also a feature we could consider removing - as-is, it can prevent sleep on some sites that use hanging POST operations for chat channels, for instance). On the other hand, having a system go to sleep in the middle of a 5 GB upload could be pretty frustrating.
,
Jul 11
+1 for removing this feature due to hanging POST abuse. My home desktop refuses to sleep if Yahoo mail is open.
,
Jul 17
,
Jul 17
We could also improve the behavior - once we've uploaded the body, for instance, we could release the WakeLock, rather than waiting for request completion (That doesn't handle redirects, but if you respond to a 5 GB upload with a redirect that requires re-sending the upload....). Anyhow, why don't I try removing the behavior, and we can see if we get any complaints. The original author of the class is still around, so I'll rope them into the CL.
,
Jul 18
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/96f42aeca92bc375433a34b2cc2854fe54b5395e commit 96f42aeca92bc375433a34b2cc2854fe54b5395e Author: Matt Menke <mmenke@chromium.org> Date: Wed Jul 18 11:34:36 2018 Prevent POSTs from blocking suspend mode. The goal of this log was not to enter suspending mode while uploading a large resource, but it also causes hanging POST requests, sometimes used for chat channels, to prevent a system from entering suspend mode. It also can keep systems awake after their lid is closed, consuming battery unexpectedly. Chrome is the only browser that does this. We'll either need to port the behavior to work with the network service, or remove it from Chrome before we ship the network service (So it's one less difference between Chrome with / without the network service). We opted to go with the latter approach, since the current behavior can cause problems. There's also a wake lock web API under discussion, though not yet shipped. TBR=jam@chromium.org Bug: 571250 , 789673 Change-Id: I6e121b9a862496dfb2da630a180cd00cdde30528 Reviewed-on: https://chromium-review.googlesource.com/1140207 Commit-Queue: Matt Menke <mmenke@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#576006} [modify] https://crrev.com/96f42aeca92bc375433a34b2cc2854fe54b5395e/content/browser/BUILD.gn [modify] https://crrev.com/96f42aeca92bc375433a34b2cc2854fe54b5395e/content/browser/loader/resource_dispatcher_host_impl.cc [delete] https://crrev.com/fe271294e83d3aa93219baf7fe66e81304489a1c/content/browser/loader/wake_lock_resource_throttle.cc [delete] https://crrev.com/fe271294e83d3aa93219baf7fe66e81304489a1c/content/browser/loader/wake_lock_resource_throttle.h
,
Jul 18
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by dxie@chromium.org
, May 17 2018Status: Available (was: Untriaged)