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

Issue 2065163005: ParseHTMLOnMainThread: notify main thread of chunks less frequently (Closed)

Created:
4 years, 6 months ago by Charlie Harrison
Modified:
4 years, 4 months ago
Reviewers:
kouhei (in TOK)
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, kinuko+watch
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ParseHTMLOnMainThread: notify main thread of chunks less frequently This patch adds an experiment variant to the ParseHTMLOnMainThread experiment threaded group. It adds a group that uses the threaded parser, but coalesces token chunks in the background parser, notifying the main thread less often. This can often result in issuing preloads faster due to not eagerly parsing/scripting when tokens are about to come in. Note: this experiment group actually aligns the threaded behavior closer to the non-threaded behavior. The non-threaded experiment group also runs the entirety of pumpTokenizer when it is tokenizing, whereas the threaded parser usually starts parsing at the first call to notifyPendingTokenizedChunks (if it is idle). This is usually very early on in pumpTokenizer, because we split up chunks very fine grained. This experiment group tries not to start the main thread parsing until we've tokenized a bit more. TBR=kinuko@chromium.org BUG=632394 Committed: https://crrev.com/803fb39346006820c009f206dc05dd62b12e82ee Cr-Commit-Position: refs/heads/master@{#408537}

Patch Set 1 #

Patch Set 2 : only do it for the first set of chunks #

Patch Set 3 : Add a setting to the experiment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -9 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/Settings.in View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h View 1 2 3 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp View 1 2 6 chunks +21 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 32 (17 generated)
Charlie Harrison
Kouhei, can you take a look at this approach? It may be a bit too ...
4 years, 6 months ago (2016-06-15 06:20:43 UTC) #2
kouhei (in TOK)
Thanks for working on this! This is a great find! I'm ok with trying this ...
4 years, 6 months ago (2016-06-15 07:09:03 UTC) #3
Charlie Harrison
On 2016/06/15 at 07:09:03, kouhei wrote: > Thanks for working on this! This is a ...
4 years, 6 months ago (2016-06-15 20:15:21 UTC) #4
Charlie Harrison
I wonder if we can rework this so it doesn't need finch? I'm noticing a ...
4 years, 5 months ago (2016-07-22 21:08:39 UTC) #5
Charlie Harrison
Ok. I reworked this so that we only change the initial call to pumpTokenizer. This ...
4 years, 4 months ago (2016-07-26 22:42:48 UTC) #8
Charlie Harrison
Note that this doesn't really affect the ParseHTMLOnMainThread experiment as it currently stands, because we ...
4 years, 4 months ago (2016-07-26 22:47:13 UTC) #11
Charlie Harrison
Sorry, I've changed my mind again on this, and think we should go back to ...
4 years, 4 months ago (2016-07-27 19:10:34 UTC) #12
kouhei (in TOK)
I have no objections to PS#1 approach, but I really want to have some gating ...
4 years, 4 months ago (2016-07-28 01:28:16 UTC) #13
Charlie Harrison
Yeah SG.
4 years, 4 months ago (2016-07-28 01:30:19 UTC) #14
Charlie Harrison
Alright, I decided to add this group to the ParseHTMLOnMainThread experiment (for the threaded group). ...
4 years, 4 months ago (2016-07-28 17:08:17 UTC) #19
kouhei (in TOK)
On 2016/07/28 17:08:17, csharrison wrote: > Alright, I decided to add this group to the ...
4 years, 4 months ago (2016-07-29 00:41:16 UTC) #22
Charlie Harrison
Thank you. I've updated the description to state a bit clearer why this fits into ...
4 years, 4 months ago (2016-07-29 00:56:06 UTC) #25
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/2065163005/40001
4 years, 4 months ago (2016-07-29 00:57:22 UTC) #28
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 4 months ago (2016-07-29 01:00:44 UTC) #30
commit-bot: I haz the power
4 years, 4 months ago (2016-07-29 01:03:13 UTC) #32
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/803fb39346006820c009f206dc05dd62b12e82ee
Cr-Commit-Position: refs/heads/master@{#408537}

Powered by Google App Engine
This is Rietveld 408576698