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

Issue 2238543002: Instrument parser blocking script execution time. (Closed)

Created:
4 years, 4 months ago by Bryan McQuade
Modified:
4 years, 3 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, dominicc+watchlist_chromium.org, eae+blinkwatch, kinuko+watch, loading-reviews+parser_chromium.org, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Instrument parser blocking script execution time. We already track parser blocking script load time. This patch adds support for tracking parser blocking script execution time. We have a few use cases for this: * allows us to understand % of parse time blocked on script exec time, to better understand whether script exec time is a significant contributor to page load time * having this would have helped us to catch a regression that took hours of time to identify the root cause of (crbug.com/608424) * there is a desire to understand how much time scripts inserted via doc.write spend executing, in addition to loading BUG=640260 Committed: https://crrev.com/cb637fa03a98d0f764cfcfac6fae5cebc4c7c473 Cr-Commit-Position: refs/heads/master@{#417330}

Patch Set 1 #

Patch Set 2 : remove log #

Patch Set 3 : complete impl #

Patch Set 4 : centralize script exec time tracking #

Patch Set 5 : rebase #

Patch Set 6 : only record time for non async scripts #

Patch Set 7 : revert xml parser changes #

Patch Set 8 : fix comment #

Patch Set 9 : rebase #

Total comments: 2

Patch Set 10 : address comment #

Patch Set 11 : fix test #

Total comments: 1

Patch Set 12 : address comment #

Total comments: 10

Patch Set 13 : address comments #

Patch Set 14 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -83 lines) Patch
M chrome/browser/page_load_metrics/metrics_web_contents_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer_unittest.cc View 1 2 3 4 5 2 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +12 lines, -1 line 0 comments Download
M chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/page_load_metrics/page_load_metrics_messages.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/page_load_metrics/page_load_timing.h View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
M chrome/common/page_load_metrics/page_load_timing.cc View 1 2 3 4 5 2 chunks +9 lines, -2 lines 0 comments Download
M chrome/renderer/page_load_metrics/metrics_render_frame_observer.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentParserTiming.h View 1 2 3 chunks +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentParserTiming.cpp View 1 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptLoader.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +24 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptRunner.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptRunner.cpp View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +20 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 15 chunks +52 lines, -53 lines 0 comments Download
M third_party/WebKit/Source/core/timing/PerformanceTiming.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/timing/PerformanceTiming.cpp View 1 2 3 4 5 1 chunk +18 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebPerformance.cpp View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebPerformance.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 85 (64 generated)
Bryan McQuade
kouhei and japhet, PTAL for third_party/WebKit.
4 years, 4 months ago (2016-08-23 21:35:04 UTC) #34
kouhei (in TOK)
https://codereview.chromium.org/2238543002/diff/160001/third_party/WebKit/Source/core/dom/ScriptLoader.h File third_party/WebKit/Source/core/dom/ScriptLoader.h (right): https://codereview.chromium.org/2238543002/diff/160001/third_party/WebKit/Source/core/dom/ScriptLoader.h#newcode129 third_party/WebKit/Source/core/dom/ScriptLoader.h:129: WTF::Optional<ScriptRunner::ExecutionType> m_asyncExecType; Would you add another ExecutionType instead of ...
4 years, 3 months ago (2016-08-26 10:01:48 UTC) #35
Bryan McQuade
Thanks! PTAL. https://codereview.chromium.org/2238543002/diff/160001/third_party/WebKit/Source/core/dom/ScriptLoader.h File third_party/WebKit/Source/core/dom/ScriptLoader.h (right): https://codereview.chromium.org/2238543002/diff/160001/third_party/WebKit/Source/core/dom/ScriptLoader.h#newcode129 third_party/WebKit/Source/core/dom/ScriptLoader.h:129: WTF::Optional<ScriptRunner::ExecutionType> m_asyncExecType; On 2016/08/26 at 10:01:48, kouhei ...
4 years, 3 months ago (2016-08-28 21:09:23 UTC) #42
kouhei (in TOK)
lgtm. Thanks! https://codereview.chromium.org/2238543002/diff/200001/third_party/WebKit/Source/core/dom/ScriptRunner.h File third_party/WebKit/Source/core/dom/ScriptRunner.h (right): https://codereview.chromium.org/2238543002/diff/200001/third_party/WebKit/Source/core/dom/ScriptRunner.h#newcode51 third_party/WebKit/Source/core/dom/ScriptRunner.h:51: enum AsyncExecutionType { NoExecType, AsyncExecution, InOrderExecution }; ...
4 years, 3 months ago (2016-08-29 00:20:49 UTC) #45
Bryan McQuade
On 2016/08/29 at 00:20:49, kouhei wrote: > lgtm. Thanks! > > https://codereview.chromium.org/2238543002/diff/200001/third_party/WebKit/Source/core/dom/ScriptRunner.h > File third_party/WebKit/Source/core/dom/ScriptRunner.h ...
4 years, 3 months ago (2016-08-29 19:44:24 UTC) #46
Bryan McQuade
csharrison, PTAL, thanks!
4 years, 3 months ago (2016-09-06 19:09:21 UTC) #53
Charlie Harrison
On 2016/09/06 19:09:21, Bryan McQuade wrote: > csharrison, PTAL, thanks! I'll try to get to ...
4 years, 3 months ago (2016-09-06 19:10:29 UTC) #54
Charlie Harrison
Looks like you need to update histograms.xml as well. https://codereview.chromium.org/2238543002/diff/220001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc File chrome/browser/page_load_metrics/metrics_web_contents_observer.cc (right): https://codereview.chromium.org/2238543002/diff/220001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc#newcode139 chrome/browser/page_load_metrics/metrics_web_contents_observer.cc:139: ...
4 years, 3 months ago (2016-09-07 14:57:37 UTC) #55
Bryan McQuade
Thanks! PTAL. https://codereview.chromium.org/2238543002/diff/220001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc File chrome/browser/page_load_metrics/metrics_web_contents_observer.cc (right): https://codereview.chromium.org/2238543002/diff/220001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc#newcode139 chrome/browser/page_load_metrics/metrics_web_contents_observer.cc:139: << "Invalid " On 2016/09/07 at 14:57:37, ...
4 years, 3 months ago (2016-09-07 18:26:09 UTC) #57
Charlie Harrison
I think you still need an update to histograms.xml https://codereview.chromium.org/2238543002/diff/220001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc File chrome/browser/page_load_metrics/metrics_web_contents_observer.cc (right): https://codereview.chromium.org/2238543002/diff/220001/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc#newcode139 chrome/browser/page_load_metrics/metrics_web_contents_observer.cc:139: ...
4 years, 3 months ago (2016-09-07 18:32:51 UTC) #59
Bryan McQuade
I updated histograms.xml. PTAL, thanks! holte, PTAL for histograms.xml, thanks! https://codereview.chromium.org/2238543002/diff/220001/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc File chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc (right): https://codereview.chromium.org/2238543002/diff/220001/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc#newcode138 ...
4 years, 3 months ago (2016-09-07 23:07:59 UTC) #65
Steven Holte
histograms lgtm
4 years, 3 months ago (2016-09-07 23:15:44 UTC) #66
Charlie Harrison
Thanks. page_load_metrics lgtm
4 years, 3 months ago (2016-09-08 00:24:57 UTC) #67
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/2238543002/260001
4 years, 3 months ago (2016-09-08 11:28:08 UTC) #72
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/255457)
4 years, 3 months ago (2016-09-08 11:32:34 UTC) #74
Bryan McQuade
tsepez, PTAL for page_load_metrics_messages.*, thanks!
4 years, 3 months ago (2016-09-08 11:53:53 UTC) #77
Bryan McQuade
tsepez, PTAL for page_load_metrics_messages.*, thanks!
4 years, 3 months ago (2016-09-08 11:54:14 UTC) #79
Tom Sepez
messages LGTM
4 years, 3 months ago (2016-09-08 17:39:36 UTC) #80
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/2238543002/260001
4 years, 3 months ago (2016-09-08 17:41:17 UTC) #82
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 3 months ago (2016-09-08 17:47:10 UTC) #83
commit-bot: I haz the power
4 years, 3 months ago (2016-09-08 17:49:55 UTC) #85
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/cb637fa03a98d0f764cfcfac6fae5cebc4c7c473
Cr-Commit-Position: refs/heads/master@{#417330}

Powered by Google App Engine
This is Rietveld 408576698