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

Issue 2397753006: scheduler: Detect load RAIL mode (Closed)

Created:
4 years, 2 months ago by Sami
Modified:
4 years ago
CC:
chromium-reviews, dshwang, dglazkov+blink, blink-reviews-paint_chromium.org, blink-reviews, scheduler-bugs_chromium.org, blink-reviews-api_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

scheduler: Detect load RAIL mode This patch implements detection for the loading RAIL mode. This mode starts when the top-level frame navigates and lasts until we see the first meaningful paint for the top-level frame (which is currently not guaranteed to happen on all pages). We don't currently use this state for scheduling but only pass the information to v8 which can use it to adjust garbage collection policies. As a safeguard against cases where FMP is not detected, we terminate the load stage if we see user input. The assumption is that if the user is interacting with the page, there is likely meaningful content on the screen at that point. BUG=613520 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc Cr-Commit-Position: refs/heads/master@{#435616}

Patch Set 1 #

Patch Set 2 : Maintain threading constraints #

Patch Set 3 : Ignore navigations in child frames #

Patch Set 4 : Rebased #

Total comments: 6

Patch Set 5 : Review comments #

Patch Set 6 : Use first meaningful paint candidate instead #

Patch Set 7 : Use FMP_c after FCP #

Patch Set 8 : Typo #

Total comments: 3

Patch Set 9 : Ignore first FMP_c after FCP #

Patch Set 10 : Add fallback for missing FMP #

Patch Set 11 : Add fallback for missing FMP #

Total comments: 2

Patch Set 12 : Review comments #

Total comments: 5

Patch Set 13 : Review comments + new test #

Patch Set 14 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -29 lines) Patch
M third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetectorTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintTiming.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintTiming.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/child/web_scheduler_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +5 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +27 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +36 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_web_scheduler_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_web_scheduler_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/WebFrameScheduler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebScheduler.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 78 (45 generated)
Sami
PTAL. As discussed a slight deficiency here is that we only track navigations on a ...
4 years, 2 months ago (2016-10-06 18:01:14 UTC) #6
ulan
On 2016/10/06 18:01:14, Sami (slow -- traveling) wrote: > PTAL. As discussed a slight deficiency ...
4 years, 2 months ago (2016-10-10 18:47:40 UTC) #13
Sami
On 2016/10/10 18:47:40, ulan wrote: > On 2016/10/06 18:01:14, Sami (slow -- traveling) wrote: > ...
4 years, 2 months ago (2016-10-11 05:24:21 UTC) #16
alex clarke (OOO till 29th)
https://codereview.chromium.org/2397753006/diff/60001/third_party/WebKit/Source/platform/scheduler/child/web_scheduler_impl.h File third_party/WebKit/Source/platform/scheduler/child/web_scheduler_impl.h (left): https://codereview.chromium.org/2397753006/diff/60001/third_party/WebKit/Source/platform/scheduler/child/web_scheduler_impl.h#oldcode49 third_party/WebKit/Source/platform/scheduler/child/web_scheduler_impl.h:49: void onNavigationStarted() override {} Hmm looks like we never ...
4 years, 2 months ago (2016-10-11 10:32:50 UTC) #23
Sami
https://codereview.chromium.org/2397753006/diff/60001/third_party/WebKit/Source/platform/scheduler/child/web_scheduler_impl.h File third_party/WebKit/Source/platform/scheduler/child/web_scheduler_impl.h (left): https://codereview.chromium.org/2397753006/diff/60001/third_party/WebKit/Source/platform/scheduler/child/web_scheduler_impl.h#oldcode49 third_party/WebKit/Source/platform/scheduler/child/web_scheduler_impl.h:49: void onNavigationStarted() override {} On 2016/10/11 10:32:50, alex clarke ...
4 years, 2 months ago (2016-10-12 04:21:41 UTC) #24
Sami
+kouhei@, here's the patch I was talking about.
4 years, 2 months ago (2016-10-12 06:35:11 UTC) #28
kouhei (in TOK)
+ksakamoto
4 years, 2 months ago (2016-10-12 06:36:46 UTC) #30
Kunihiko Sakamoto
https://codereview.chromium.org/2397753006/diff/140001/third_party/WebKit/Source/core/paint/PaintTiming.cpp File third_party/WebKit/Source/core/paint/PaintTiming.cpp (right): https://codereview.chromium.org/2397753006/diff/140001/third_party/WebKit/Source/core/paint/PaintTiming.cpp#newcode76 third_party/WebKit/Source/core/paint/PaintTiming.cpp:76: if (!m_firstContentfulPaint) Within a single paint phase, this runs ...
4 years, 2 months ago (2016-10-13 08:01:35 UTC) #33
Sami
https://codereview.chromium.org/2397753006/diff/140001/third_party/WebKit/Source/core/paint/PaintTiming.cpp File third_party/WebKit/Source/core/paint/PaintTiming.cpp (right): https://codereview.chromium.org/2397753006/diff/140001/third_party/WebKit/Source/core/paint/PaintTiming.cpp#newcode76 third_party/WebKit/Source/core/paint/PaintTiming.cpp:76: if (!m_firstContentfulPaint) On 2016/10/13 08:01:34, Kunihiko Sakamoto wrote: > ...
4 years, 2 months ago (2016-10-13 08:23:59 UTC) #34
Kunihiko Sakamoto
https://codereview.chromium.org/2397753006/diff/140001/third_party/WebKit/Source/core/paint/PaintTiming.cpp File third_party/WebKit/Source/core/paint/PaintTiming.cpp (right): https://codereview.chromium.org/2397753006/diff/140001/third_party/WebKit/Source/core/paint/PaintTiming.cpp#newcode76 third_party/WebKit/Source/core/paint/PaintTiming.cpp:76: if (!m_firstContentfulPaint) On 2016/10/13 08:23:59, Sami (slow -- traveling) ...
4 years, 2 months ago (2016-10-13 08:38:46 UTC) #35
ulan
> Interesting, I think this may be a bug with how we detect top-level navigations. ...
4 years, 2 months ago (2016-10-18 11:10:14 UTC) #36
ulan
Regarding the multiple LOAD signals when scrolling mobile facebook: RenderFrameImpl::didCommitProvisionalLoad calls render_thread_impl->GetRendererScheduler()->OnNavigationStarted() [https://cs.chromium.org/chromium/src/content/renderer/render_frame_impl.cc?rcl=1478593042&l=3633] That function ...
4 years, 1 month ago (2016-11-08 15:36:17 UTC) #37
Sami
On 2016/11/08 15:36:17, ulan wrote: > Regarding the multiple LOAD signals when scrolling mobile facebook: ...
4 years, 1 month ago (2016-11-16 14:36:28 UTC) #38
Sami
It took a while but I finally managed to reproduce the multiple loads -issue. The ...
4 years ago (2016-11-24 17:40:04 UTC) #39
alex clarke (OOO till 29th)
On 2016/11/24 17:40:04, Sami wrote: > It took a while but I finally managed to ...
4 years ago (2016-11-24 17:47:42 UTC) #41
alex clarke (OOO till 29th)
lgtm https://codereview.chromium.org/2397753006/diff/190001/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc File third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc (right): https://codereview.chromium.org/2397753006/diff/190001/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc#newcode1499 third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc:1499: UpdatePolicy(); Can we call UpdatePolicyLocked(UpdateType::MAY_EARLY_OUT_IF_POLICY_UNCHANGED); inside the lock?
4 years ago (2016-11-24 17:54:23 UTC) #42
Sami
Thanks! On 2016/11/24 17:47:42, alex clarke wrote: > It might be interesting to emit a ...
4 years ago (2016-11-24 18:41:38 UTC) #43
Sami
+haraken@ for real.
4 years ago (2016-11-24 18:45:58 UTC) #47
haraken
Looks good but I want to have kouhei@ confirm the change. > As a safeguard ...
4 years ago (2016-11-25 00:20:22 UTC) #50
Sami
On 2016/11/25 00:20:22, haraken wrote: > Looks good but I want to have kouhei@ confirm ...
4 years ago (2016-11-25 11:42:01 UTC) #51
Sami
Kouhei, ping?
4 years ago (2016-11-29 12:46:49 UTC) #52
kouhei (in TOK)
^ Source/core/paint lg I'd like to delegate Source/core/paint review to ksakamoto@ https://codereview.chromium.org/2397753006/diff/210001/third_party/WebKit/Source/core/paint/PaintTiming.cpp File third_party/WebKit/Source/core/paint/PaintTiming.cpp (right): ...
4 years ago (2016-11-30 01:30:20 UTC) #53
kouhei (in TOK)
lgtm mostly lg https://codereview.chromium.org/2397753006/diff/210001/third_party/WebKit/Source/core/paint/PaintTiming.cpp File third_party/WebKit/Source/core/paint/PaintTiming.cpp (right): https://codereview.chromium.org/2397753006/diff/210001/third_party/WebKit/Source/core/paint/PaintTiming.cpp#newcode75 third_party/WebKit/Source/core/paint/PaintTiming.cpp:75: // paint. On 2016/11/30 01:30:20, kouhei ...
4 years ago (2016-11-30 01:36:52 UTC) #54
Sami
Thanks! https://codereview.chromium.org/2397753006/diff/210001/third_party/WebKit/Source/core/paint/PaintTiming.h File third_party/WebKit/Source/core/paint/PaintTiming.h (right): https://codereview.chromium.org/2397753006/diff/210001/third_party/WebKit/Source/core/paint/PaintTiming.h#newcode103 third_party/WebKit/Source/core/paint/PaintTiming.h:103: bool m_seenFirstMeaningfulPaintCandidate = false; On 2016/11/30 01:36:52, kouhei ...
4 years ago (2016-11-30 18:07:09 UTC) #55
kouhei (in TOK)
lgtm Thanks
4 years ago (2016-12-01 02:00:10 UTC) #61
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/2397753006/230001
4 years ago (2016-12-01 02:00:36 UTC) #63
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/316045)
4 years ago (2016-12-01 02:08:33 UTC) #65
haraken
owner LGTM
4 years ago (2016-12-01 02:12:32 UTC) #66
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/2397753006/230001
4 years ago (2016-12-01 11:08:15 UTC) #68
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/316286)
4 years ago (2016-12-01 11:14:03 UTC) #70
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/2397753006/250001
4 years ago (2016-12-01 14:02:07 UTC) #73
commit-bot: I haz the power
Committed patchset #14 (id:250001)
4 years ago (2016-12-01 15:37:11 UTC) #76
commit-bot: I haz the power
4 years ago (2016-12-01 15:38:51 UTC) #78
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/e5da9cc2e06c351293a55b4f3c3fc9d39f1e2bfc
Cr-Commit-Position: refs/heads/master@{#435616}

Powered by Google App Engine
This is Rietveld 408576698