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

Issue 1381273002: A better idle time estimator (Closed)

Created:
5 years, 2 months ago by alex clarke (OOO till 29th)
Modified:
5 years, 2 months ago
Reviewers:
Sami, yurys
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

A better idle time estimator The previous estimator only tracked the time between commit and the compositor deadline. That gives an unrealistic view of how much idle time is available. Consider a state where BeginMainFrame takes 10ms and a timer takes 4ms. Previously we'd have estimated there to be 2ms free. That meant we'd think there wasn't enough free time to run the 4ms timer, which is incorrect. The new estimator tracks how much time was spent inside compositor tasks (the only tasks that are 100% essential) each frame. It computes a rolling histogram from this and subtracts a user-selected percentile from the compositor frame interval to obtain the estimate of how much idle time there is. EXPECTED PERF IMPACT: * Regress smoothness.scrolling_tough_ad_cases/ first_gesture_scroll_update_latency * Possibly regress pinch zoom metrics This is because the cost estimation of loading tasks is likely wrong (too low). We will fix that separately. BUG=529245 Committed: https://crrev.com/8fd4c5bff683fd6d47a2902beb13df3a433a8653 Cr-Commit-Position: refs/heads/master@{#354289}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Helps if I remember to add the new files ;) #

Patch Set 3 : Better clamping #

Patch Set 4 : Another test #

Patch Set 5 : Rebased #

Total comments: 14

Patch Set 6 : Responding to feedback #

Total comments: 6

Patch Set 7 : Finishing touches? #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+412 lines, -43 lines) Patch
M components/components_tests.gyp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A components/scheduler/renderer/idle_time_estimator.h View 1 2 3 4 5 6 1 chunk +58 lines, -0 lines 0 comments Download
A components/scheduler/renderer/idle_time_estimator.cc View 1 2 3 4 5 6 1 chunk +73 lines, -0 lines 1 comment Download
A components/scheduler/renderer/idle_time_estimator_unittest.cc View 1 2 3 4 5 1 chunk +146 lines, -0 lines 0 comments Download
M components/scheduler/renderer/renderer_scheduler_impl.h View 1 2 3 4 5 4 chunks +11 lines, -3 lines 0 comments Download
M components/scheduler/renderer/renderer_scheduler_impl.cc View 1 2 3 4 5 6 12 chunks +31 lines, -24 lines 0 comments Download
M components/scheduler/renderer/renderer_scheduler_impl_unittest.cc View 1 2 3 4 5 10 chunks +90 lines, -16 lines 0 comments Download
M components/scheduler/scheduler.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (7 generated)
alex clarke (OOO till 29th)
5 years, 2 months ago (2015-10-02 17:34:43 UTC) #2
Sami
I like the simplicity of this. Looks like the estimator itself got left out of ...
5 years, 2 months ago (2015-10-03 00:56:15 UTC) #3
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/1381273002/diff/1/components/scheduler/renderer/renderer_scheduler_impl.cc File components/scheduler/renderer/renderer_scheduler_impl.cc (right): https://codereview.chromium.org/1381273002/diff/1/components/scheduler/renderer/renderer_scheduler_impl.cc#newcode835 components/scheduler/renderer/renderer_scheduler_impl.cc:835: state->SetDouble("idle_time_estimator", On 2015/10/03 00:56:15, Sami wrote: > nit: ...
5 years, 2 months ago (2015-10-05 17:32:20 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1381273002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1381273002/60001
5 years, 2 months ago (2015-10-05 17:38:48 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-05 18:47:35 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1381273002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1381273002/80001
5 years, 2 months ago (2015-10-07 16:39:45 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-07 17:34:49 UTC) #12
Sami
Sorry it took me a while to get to this. https://codereview.chromium.org/1381273002/diff/80001/components/scheduler/renderer/idle_time_estimator.cc File components/scheduler/renderer/idle_time_estimator.cc (right): https://codereview.chromium.org/1381273002/diff/80001/components/scheduler/renderer/idle_time_estimator.cc#newcode27 ...
5 years, 2 months ago (2015-10-09 02:32:19 UTC) #13
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/1381273002/diff/80001/components/scheduler/renderer/idle_time_estimator.cc File components/scheduler/renderer/idle_time_estimator.cc (right): https://codereview.chromium.org/1381273002/diff/80001/components/scheduler/renderer/idle_time_estimator.cc#newcode27 components/scheduler/renderer/idle_time_estimator.cc:27: base::TimeDelta expected_frame_length = std::min( On 2015/10/09 02:32:18, Sami ...
5 years, 2 months ago (2015-10-15 13:24:01 UTC) #14
Sami
Looks nice and straightforward now. Could you update the commit message to match the implementation? ...
5 years, 2 months ago (2015-10-15 14:43:04 UTC) #15
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/1381273002/diff/100001/components/scheduler/renderer/idle_time_estimator.cc File components/scheduler/renderer/idle_time_estimator.cc (right): https://codereview.chromium.org/1381273002/diff/100001/components/scheduler/renderer/idle_time_estimator.cc#newcode55 components/scheduler/renderer/idle_time_estimator.cc:55: task_start_time_ = time_source_->NowTicks(); On 2015/10/15 14:43:04, Sami wrote: ...
5 years, 2 months ago (2015-10-15 16:07:52 UTC) #16
Sami
Thanks, lgtm.
5 years, 2 months ago (2015-10-15 16:18:42 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1381273002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1381273002/120001
5 years, 2 months ago (2015-10-15 16:20:01 UTC) #19
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 2 months ago (2015-10-15 17:22:44 UTC) #20
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/8fd4c5bff683fd6d47a2902beb13df3a433a8653 Cr-Commit-Position: refs/heads/master@{#354289}
5 years, 2 months ago (2015-10-15 17:23:42 UTC) #21
yurys
5 years, 2 months ago (2015-10-20 21:11:19 UTC) #23
Message was sent while issue was closed.
https://codereview.chromium.org/1381273002/diff/120001/components/scheduler/r...
File components/scheduler/renderer/idle_time_estimator.cc (right):

https://codereview.chromium.org/1381273002/diff/120001/components/scheduler/r...
components/scheduler/renderer/idle_time_estimator.cc:61:
DCHECK_EQ(nesting_level_, 1);
This DCHECK keeps failing when pausing on JS breakpoint: see
https://code.google.com/p/chromium/issues/detail?id=545624

Powered by Google App Engine
This is Rietveld 408576698