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

Issue 1425973003: cc: Don't attempt main thread synchronization if it is slow. (Closed)

Created:
5 years, 1 month ago by brianderson
Modified:
5 years, 1 month ago
Reviewers:
sunnyps, Sami, mithro-old
CC:
chromium-reviews, cc-bugs_chromium.org, scheduler-bugs_chromium.org, tdresser
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Don't attempt main thread synchronization if it is slow. This patch: 1) Adds a critical_begin_main_frame_to_activate_is_fast flag. 2) Separates impl_latency_takes_priority_ into tree_priority_ and a scroll_handler_state_. 3) Replaces impl_latency_takes_priority with ImplLatencyTakesPriority(), which is now a function of the above and is now true when the main thread is too slow. There is also a small change to the latency recovery logic that estimates the main thread response time depending on whether the the BeginMainFrame is critical or not. BUG=469953 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/42ef946ac829db450d131ad06a399a85f9fe207f Cr-Commit-Position: refs/heads/master@{#360500}

Patch Set 1 #

Total comments: 5

Patch Set 2 : rebase on 0 #

Patch Set 3 : rebase on 1415763008; existing tests pass; new tests needed #

Total comments: 4

Patch Set 4 : Sami's review; rebase; new tests still needed #

Patch Set 5 : new tests #

Total comments: 3

Patch Set 6 : rebase; change names; use enum class #

Unified diffs Side-by-side diffs Delta from patch set Stats (+406 lines, -129 lines) Patch
M cc/scheduler/scheduler.h View 1 2 3 4 5 4 chunks +11 lines, -5 lines 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 3 4 5 9 chunks +61 lines, -18 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.h View 1 2 3 4 5 4 chunks +19 lines, -5 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.cc View 1 2 3 4 5 7 chunks +50 lines, -11 lines 0 comments Download
M cc/scheduler/scheduler_state_machine_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M cc/scheduler/scheduler_unittest.cc View 1 2 3 4 5 21 chunks +194 lines, -81 lines 0 comments Download
M cc/test/scheduler_test_common.h View 1 2 3 4 5 3 chunks +19 lines, -0 lines 0 comments Download
M cc/test/scheduler_test_common.cc View 1 2 3 4 5 3 chunks +37 lines, -0 lines 0 comments Download
M cc/trees/thread_proxy.cc View 1 2 3 4 5 3 chunks +12 lines, -8 lines 0 comments Download

Messages

Total messages: 18 (5 generated)
Sami
I really like this idea, but have one thought about cost estimation. https://codereview.chromium.org/1425973003/diff/1/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc ...
5 years, 1 month ago (2015-10-29 10:53:56 UTC) #2
brianderson
https://codereview.chromium.org/1425973003/diff/1/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1425973003/diff/1/cc/scheduler/scheduler.cc#newcode473 cc/scheduler/scheduler.cc:473: state_machine_.SetMainThreadIsFast(bmf_to_activate_estimate < args.interval); On 2015/10/29 10:53:56, Sami wrote: > ...
5 years, 1 month ago (2015-10-29 17:56:52 UTC) #3
Sami
https://codereview.chromium.org/1425973003/diff/1/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1425973003/diff/1/cc/scheduler/scheduler.cc#newcode473 cc/scheduler/scheduler.cc:473: state_machine_.SetMainThreadIsFast(bmf_to_activate_estimate < args.interval); On 2015/10/29 17:56:51, brianderson wrote: > ...
5 years, 1 month ago (2015-10-29 18:37:04 UTC) #4
brianderson
WIP patch to break down BeginMainFrame here: https://codereview.chromium.org/1432463002
5 years, 1 month ago (2015-10-31 01:11:05 UTC) #5
brianderson
All existing tests pass now and I removed the circular dependency, but I still need ...
5 years, 1 month ago (2015-11-06 02:02:37 UTC) #7
Sami
https://codereview.chromium.org/1425973003/diff/40001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1425973003/diff/40001/cc/scheduler/scheduler.cc#newcode482 cc/scheduler/scheduler.cc:482: bmf_to_activate_estimate_if_critical < args.interval); Should we be comparing against the ...
5 years, 1 month ago (2015-11-06 11:54:43 UTC) #8
brianderson
https://codereview.chromium.org/1425973003/diff/40001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1425973003/diff/40001/cc/scheduler/scheduler.cc#newcode482 cc/scheduler/scheduler.cc:482: bmf_to_activate_estimate_if_critical < args.interval); On 2015/11/06 11:54:42, Sami (slow) wrote: ...
5 years, 1 month ago (2015-11-12 20:22:04 UTC) #9
brianderson
Ptal! New tests added for: 1) Main thread latency recovery 2) Impl thread latency recovery ...
5 years, 1 month ago (2015-11-17 22:57:04 UTC) #10
brianderson
https://codereview.chromium.org/1425973003/diff/80001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1425973003/diff/80001/cc/scheduler/scheduler.cc#newcode221 cc/scheduler/scheduler.cc:221: void Scheduler::SetSmoothnessMode(TreePriority tree_priority, Note: I ended up keeping this ...
5 years, 1 month ago (2015-11-17 23:01:45 UTC) #11
Sami
lgtm, thanks for adding the tests. SmoothnessMode is a bit vague but I can't think ...
5 years, 1 month ago (2015-11-18 19:46:05 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1425973003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1425973003/100001
5 years, 1 month ago (2015-11-19 01:06:58 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 1 month ago (2015-11-19 02:36:47 UTC) #17
commit-bot: I haz the power
5 years, 1 month ago (2015-11-19 02:38:08 UTC) #18
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/42ef946ac829db450d131ad06a399a85f9fe207f
Cr-Commit-Position: refs/heads/master@{#360500}

Powered by Google App Engine
This is Rietveld 408576698