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

Issue 2669883003: Scheduler: Enqueue non-JS-timer tasks into the unthrottled task runner (Closed)

Created:
3 years, 10 months ago by nhiroki
Modified:
3 years, 10 months ago
Reviewers:
haraken, Sami, altimin, tzik
CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Scheduler: Enqueue non-JS-timer tasks into the unthrottled task runner We found throttling some of non-JS-timer tasks may break existing web pages, so this CL tentatively makes them unthrottled. In addition, this CL switches a task type for PostMessageTimer from TaskType::Timer to TaskType::PostedMessage because the timer is used only for performing postMessage() and actually not used as a JS timer. BUG=684947 Review-Url: https://codereview.chromium.org/2669883003 Cr-Commit-Position: refs/heads/master@{#448173} Committed: https://chromium.googlesource.com/chromium/src/+/04055dd2786e27cde8d210b68e7a726fab6d0c42

Patch Set 1 #

Total comments: 5

Patch Set 2 : unthrottle more #

Patch Set 3 : rebase #

Total comments: 2

Patch Set 4 : unthrottle TaskType::UnspecedTimer #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -8 lines) Patch
M third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp View 1 2 3 2 chunks +12 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 44 (27 generated)
nhiroki
Hi, could you review this? Thanks. https://codereview.chromium.org/2669883003/diff/1/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp File third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp (right): https://codereview.chromium.org/2669883003/diff/1/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp#newcode48 third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp:48: case TaskType::PostedMessage: As ...
3 years, 10 months ago (2017-02-02 05:46:38 UTC) #4
haraken
I want to hear thoughts of Sami and Altimin, but I'd prefer moving all task ...
3 years, 10 months ago (2017-02-02 05:54:41 UTC) #7
altimin
https://codereview.chromium.org/2669883003/diff/1/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp File third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp (right): https://codereview.chromium.org/2669883003/diff/1/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp#newcode48 third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp:48: case TaskType::PostedMessage: On 2017/02/02 05:46:38, nhiroki (slow) wrote: > ...
3 years, 10 months ago (2017-02-02 18:41:25 UTC) #10
Sami
https://codereview.chromium.org/2669883003/diff/1/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp File third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp (right): https://codereview.chromium.org/2669883003/diff/1/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp#newcode48 third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp:48: case TaskType::PostedMessage: On 2017/02/02 18:41:25, altimin wrote: > On ...
3 years, 10 months ago (2017-02-02 23:37:11 UTC) #11
nhiroki
Thank you for your comments! I moved more tasks to the unthrottled task runner. PTAL. ...
3 years, 10 months ago (2017-02-03 15:07:35 UTC) #20
haraken
LGTM https://codereview.chromium.org/2669883003/diff/60001/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp File third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp (right): https://codereview.chromium.org/2669883003/diff/60001/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp#newcode20 third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp:20: case TaskType::UnspecedTimer: I would move UnspecedTimer to the ...
3 years, 10 months ago (2017-02-03 16:33:47 UTC) #23
Sami
lgtm % Kentaro's comment.
3 years, 10 months ago (2017-02-03 20:31:43 UTC) #24
tzik
lgtm
3 years, 10 months ago (2017-02-03 21:36:06 UTC) #25
nhiroki
Thank you. https://codereview.chromium.org/2669883003/diff/60001/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp File third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp (right): https://codereview.chromium.org/2669883003/diff/60001/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp#newcode20 third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp:20: case TaskType::UnspecedTimer: On 2017/02/03 16:33:47, haraken wrote: ...
3 years, 10 months ago (2017-02-03 21:39:17 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/2669883003/80001
3 years, 10 months ago (2017-02-04 13:12:06 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
3 years, 10 months ago (2017-02-04 15:12:44 UTC) #35
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/2669883003/80001
3 years, 10 months ago (2017-02-05 01:38:44 UTC) #37
commit-bot: I haz the power
Committed patchset #4 (id:80001) as https://chromium.googlesource.com/chromium/src/+/04055dd2786e27cde8d210b68e7a726fab6d0c42
3 years, 10 months ago (2017-02-05 04:06:18 UTC) #40
RE66
On 2017/02/05 04:06:18, commit-bot: I haz the power wrote: > Committed patchset #4 (id:80001) as ...
3 years, 10 months ago (2017-02-05 04:57:48 UTC) #41
nhiroki
On 2017/02/05 04:57:48, RE66 wrote: > On 2017/02/05 04:06:18, commit-bot: I haz the power wrote: ...
3 years, 10 months ago (2017-02-07 10:42:10 UTC) #42
Sami
On 2017/02/07 10:42:10, nhiroki (slow) wrote: > On 2017/02/05 04:57:48, RE66 wrote: > > On ...
3 years, 10 months ago (2017-02-07 10:49:05 UTC) #43
altimin
3 years, 10 months ago (2017-02-07 11:38:29 UTC) #44
Message was sent while issue was closed.
On 2017/02/07 10:49:05, Sami (slow -- travelling) wrote:
> On 2017/02/07 10:42:10, nhiroki (slow) wrote:
> > On 2017/02/05 04:57:48, RE66 wrote:
> > > On 2017/02/05 04:06:18, commit-bot: I haz the power wrote:
> > > > Committed patchset #4 (id:80001) as
> > > >
> > >
> >
>
https://chromium.googlesource.com/chromium/src/+/04055dd2786e27cde8d210b68e7a...
> > > 
> > > if "We found throttling some of non-JS-timer tasks may break existing web
> > > pages,"
> > > then there are bugs in other code not the schedular. 
> > > The other code should work under any schedulaing policy. 
> > > Scedulaing is only a priority mechanisim. 
> > > Your fix hide the real bugs
> > 
> > “throttling some of non-JS-timer tasks may break existing web pages” could
be
> a
> > confusing phrase. “throttling some of non-JS-timer tasks may make existing
web
> > pages useless” would represents more accurately what I wanted to say here.
> > 
> > This is a workaround not for a scheduler bug but for a priority issue. As
you
> > mentioned, web applications should work under any scheduling policy, but
some
> > applications do not really make sense under task throttling. For example, a
> chat
> > application would be expected to work responsively even while it's in a
> > background tab so that it can check new messages and notify them to users.
> > Before expanding the scope of task throttling, we should consider providing
an
> > opt-out mechanism for such applications and/or identify what kind of tasks
> > shouldn't be throttled.
> 
> Furthermore, unfortunately we've seen some applications that do break when all
> we do is change priorities or enable throttling. For example some database
> libraries have timeouts for transactions, and many applications don't fail
> gracefully when those timeouts fire.

I think that we need to be firm and to force authors of these libraries adapt
and handle these timeouts. However, we will need better communication about this
before we commit to it.

Powered by Google App Engine
This is Rietveld 408576698