Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Issue 2620743002: Don't throttle web views until they've been in the background for 10s (Closed)

Created:
3 years, 11 months ago by alex clarke (OOO till 29th)
Modified:
3 years, 11 months ago
Reviewers:
haraken, Sami, altimin
CC:
altimin, chromium-reviews, blink-reviews, kinuko+watch, scheduler-bugs_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't throttle web views until they've been in the background for 10s Previously background web views had timer alignment throttling applied immediately and budget based throttling after 10s. It looks like even the timer alignment throttling on it's own is causing problems for new tabs where the visibility isn't initially known. To fix this we're changing the policy so we don't do any throttling at all until the web view has been in the background for 10s and then we turn budget based throttling & alignment on. Note this patch removes fast/dom/timer-throttling-hidden-page.html because the 10s grace period means this test would be too slow. Virtual time doesn't help because Date.now() (currently) isn't overridden. There's no support for using a mock time source in layout tests. In any event there's plenty of C++ unit test coverage for this so it's not too bad to remove the layout test. BUG=649942 Review-Url: https://codereview.chromium.org/2620743002 Cr-Commit-Position: refs/heads/master@{#442989} Committed: https://chromium.googlesource.com/chromium/src/+/368911e4215596d9e75fe64f54c9accd14b27ae5

Patch Set 1 #

Patch Set 2 : Remove tricky to fix but redundant layout test #

Total comments: 2

Patch Set 3 : Addressing Sami's comment plus adding a test #

Patch Set 4 : Fix test compile #

Patch Set 5 : Rebased #

Patch Set 6 : Fix asan test issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -160 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
D third_party/WebKit/LayoutTests/fast/dom/timer-throttling-hidden-page.html View 1 1 chunk +0 lines, -84 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/dom/timer-throttling-hidden-page-expected.txt View 1 1 chunk +0 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/platform/WebFrameScheduler.h View 1 2 3 4 1 chunk +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc View 1 2 3 4 4 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl_unittest.cc View 1 2 3 4 2 chunks +18 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.h View 1 2 3 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc View 1 2 7 chunks +28 lines, -27 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl_unittest.cc View 1 2 3 4 5 6 chunks +73 lines, -11 lines 0 comments Download

Messages

Total messages: 50 (35 generated)
alex clarke (OOO till 29th)
3 years, 11 months ago (2017-01-10 12:21:46 UTC) #13
Sami
Thanks, the fix looks good. One question below. Were you able to repro the bug ...
3 years, 11 months ago (2017-01-10 14:44:22 UTC) #17
alex clarke (OOO till 29th)
On 2017/01/10 14:44:22, Sami wrote: > Thanks, the fix looks good. One question below. > ...
3 years, 11 months ago (2017-01-11 10:08:49 UTC) #18
alex clarke (OOO till 29th)
+haraken for third_party/WebKit/Source/platform/WebFrameScheduler.h https://codereview.chromium.org/2620743002/diff/20001/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc File third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc (right): https://codereview.chromium.org/2620743002/diff/20001/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc#newcode334 third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc:334: frame_scheduler->setPageVisible(false); On 2017/01/10 14:44:22, Sami wrote: ...
3 years, 11 months ago (2017-01-11 10:54:47 UTC) #20
haraken
This change sounds very reasonable. On 2017/01/11 10:54:47, alex clarke wrote: > +haraken for third_party/WebKit/Source/platform/WebFrameScheduler.h ...
3 years, 11 months ago (2017-01-11 11:20:52 UTC) #25
Sami
lgtm, thanks!
3 years, 11 months ago (2017-01-11 11:55:40 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2620743002/60001
3 years, 11 months ago (2017-01-11 12:05:58 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/366654)
3 years, 11 months ago (2017-01-11 12:31:28 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2620743002/80001
3 years, 11 months ago (2017-01-11 13:16:08 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/98098)
3 years, 11 months ago (2017-01-11 14:40:30 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2620743002/100001
3 years, 11 months ago (2017-01-11 15:33:54 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/368858)
3 years, 11 months ago (2017-01-11 15:51:31 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2620743002/120001
3 years, 11 months ago (2017-01-11 17:08:22 UTC) #45
commit-bot: I haz the power
Committed patchset #6 (id:120001) as https://chromium.googlesource.com/chromium/src/+/368911e4215596d9e75fe64f54c9accd14b27ae5
3 years, 11 months ago (2017-01-11 20:45:45 UTC) #48
altimin
3 years, 11 months ago (2017-01-12 11:11:14 UTC) #50
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698