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

Issue 1718233002: Fix computation of runtime for throttled tasks (Closed)

Created:
4 years, 10 months ago by alex clarke (OOO till 29th)
Modified:
4 years, 10 months ago
Reviewers:
Sami
CC:
chromium-reviews, scheduler-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix computation of runtime for throttled tasks The computation of the delayed task runtime was computing the (virtual) TimeDomain's now + delay. That doesn't take into account the skew between the real time and the virtual time, which meant timers could run sooner than expected for background tabs. Timers associated with foreground tabs are unaffected. This patch makes the computation of delayed runtime the responsibility of the TimeDomain and introduces a ThrottledTimeDomain which computes the delayed runtime as realtime + delay. This means timers will no longer run sooner than expected. Under normal circumstancs this only timers whose delay modulo 1000ms is less than 100 ms are less likely to be affected. Timers whose whose delay modulo 1000ms is greater than 900 are highly likely to be affected (there's a good chance their delay was too small before). BUG=587074 Committed: https://crrev.com/b56bbe4ce3e7276a130a00d83cf00e5672cd6be1 Cr-Commit-Position: refs/heads/master@{#376993}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Responding to feedback #

Total comments: 2

Patch Set 3 : Fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -11 lines) Patch
M components/scheduler/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M components/scheduler/base/real_time_domain.h View 1 chunk +2 lines, -0 lines 0 comments Download
M components/scheduler/base/real_time_domain.cc View 2 chunks +6 lines, -1 line 0 comments Download
M components/scheduler/base/task_queue_impl.cc View 2 chunks +11 lines, -5 lines 0 comments Download
M components/scheduler/base/time_domain.h View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M components/scheduler/base/time_domain_unittest.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M components/scheduler/base/virtual_time_domain.h View 1 chunk +2 lines, -0 lines 0 comments Download
M components/scheduler/base/virtual_time_domain.cc View 1 chunk +6 lines, -0 lines 0 comments Download
A components/scheduler/renderer/throttled_time_domain.h View 1 1 chunk +34 lines, -0 lines 0 comments Download
A components/scheduler/renderer/throttled_time_domain.cc View 1 chunk +31 lines, -0 lines 0 comments Download
M components/scheduler/renderer/throttling_helper.h View 3 chunks +3 lines, -3 lines 0 comments Download
M components/scheduler/renderer/throttling_helper.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M components/scheduler/renderer/throttling_helper_unittest.cc View 1 chunk +30 lines, -0 lines 0 comments Download
M components/scheduler/scheduler.gypi View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (6 generated)
alex clarke (OOO till 29th)
4 years, 10 months ago (2016-02-22 18:39:49 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1718233002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1718233002/1
4 years, 10 months ago (2016-02-22 18:40:31 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-22 19:54:47 UTC) #6
Sami
Looks pretty neat. Just one question. https://codereview.chromium.org/1718233002/diff/1/components/scheduler/base/time_domain.h File components/scheduler/base/time_domain.h (right): https://codereview.chromium.org/1718233002/diff/1/components/scheduler/base/time_domain.h#newcode54 components/scheduler/base/time_domain.h:54: // when scomputing ...
4 years, 10 months ago (2016-02-23 11:41:22 UTC) #7
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/1718233002/diff/1/components/scheduler/base/time_domain.h File components/scheduler/base/time_domain.h (right): https://codereview.chromium.org/1718233002/diff/1/components/scheduler/base/time_domain.h#newcode54 components/scheduler/base/time_domain.h:54: // when scomputing the task run time. On ...
4 years, 10 months ago (2016-02-23 14:02:31 UTC) #8
Sami
lgtm. https://codereview.chromium.org/1718233002/diff/20001/components/scheduler/base/time_domain.h File components/scheduler/base/time_domain.h (right): https://codereview.chromium.org/1718233002/diff/20001/components/scheduler/base/time_domain.h#newcode54 components/scheduler/base/time_domain.h:54: // when scomputing the task run time. This ...
4 years, 10 months ago (2016-02-23 14:07:42 UTC) #9
alex clarke (OOO till 29th)
Thanks. https://codereview.chromium.org/1718233002/diff/20001/components/scheduler/base/time_domain.h File components/scheduler/base/time_domain.h (right): https://codereview.chromium.org/1718233002/diff/20001/components/scheduler/base/time_domain.h#newcode54 components/scheduler/base/time_domain.h:54: // when scomputing the task run time. This ...
4 years, 10 months ago (2016-02-23 14:39:18 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1718233002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1718233002/40001
4 years, 10 months ago (2016-02-23 14:39:32 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 10 months ago (2016-02-23 15:48:16 UTC) #14
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/b56bbe4ce3e7276a130a00d83cf00e5672cd6be1 Cr-Commit-Position: refs/heads/master@{#376993}
4 years, 10 months ago (2016-02-23 15:50:12 UTC) #16
jaydasika
4 years, 10 months ago (2016-02-26 20:02:56 UTC) #17
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/1741053002/ by jaydasika@chromium.org.

The reason for reverting is: Speculative revert for Compile failure on Win, Mac
& Precise 64 Beta Bots (crbug.com/590286) .

Powered by Google App Engine
This is Rietveld 408576698