Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(82)

Issue 1175183006: Make it possible to modify background HTML parser token limits. (Closed)

Created:
4 years, 10 months ago by Bryan McQuade
Modified:
4 years, 10 months ago
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Make it possible to modify background HTML parser token limits. BackgroundHTMLParser currently uses hard-coded limits of: * 10k 'outstanding' tokens, which caps the number of tokens that have been sent to the main parser thread but not yet ACK'd * 1k 'pending' tokens, which specifies the number of tokens that should be sent to the main parser thread in each cross-thread message The comments for these defaults indicate that there is likely room for improvement: "These numbers have not been tuned." ... "We might want to tune again when we're closer to turning the threaded parser on by default." (from https://bugs.webkit.org/show_bug.cgi?id=110408). In lab tests, we've found that for users on low bandwidth connections, the 10k outstanding limit in particular is too aggressive and can cause pages to fetch resources that aren't needed yet, which contend for bandwidth with resources that are needed. This slows down page loads. Additionally, the 1k pending limit was chosen based on lab tests performed on a Nexus 7, and we expect that this value may not be optimal for users on lower end devices. This change makes it possible to vary these values via Settings, so we can run field trials to identify more optimal values for users on constrained networks or low end devices. I'll follow this change with a field trial change to vary these values, in RenderViewImpl::Initialize (near the call to ApplyBlinkSettings, which is where Settings is configured from --blink-settings flag values). BUG=497942 R=gavinp@chromium.org, jochen@chromium.org, japhet@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197074

Patch Set 1 #

Total comments: 9

Patch Set 2 : Make parser Settings values unsigned. Assert outstanding>=pending. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -6 lines) Patch
M Source/core/frame/Settings.in View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/parser/BackgroundHTMLParser.h View 2 chunks +7 lines, -0 lines 0 comments Download
M Source/core/html/parser/BackgroundHTMLParser.cpp View 1 4 chunks +18 lines, -6 lines 0 comments Download
M Source/core/html/parser/HTMLDocumentParser.cpp View 1 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
Bryan McQuade
gavinp, jochen, japhet: PTAL. Thanks!
4 years, 10 months ago (2015-06-11 18:03:10 UTC) #3
Nate Chapin
https://codereview.chromium.org/1175183006/diff/1/Source/core/frame/Settings.in File Source/core/frame/Settings.in (right): https://codereview.chromium.org/1175183006/diff/1/Source/core/frame/Settings.in#newcode257 Source/core/frame/Settings.in:257: backgroundHtmlParserPendingTokenLimit type=int, initial=0 Should these be unsigned? https://codereview.chromium.org/1175183006/diff/1/Source/core/html/parser/BackgroundHTMLParser.cpp File ...
4 years, 10 months ago (2015-06-11 18:48:23 UTC) #4
Bryan McQuade
https://codereview.chromium.org/1175183006/diff/1/Source/core/frame/Settings.in File Source/core/frame/Settings.in (right): https://codereview.chromium.org/1175183006/diff/1/Source/core/frame/Settings.in#newcode257 Source/core/frame/Settings.in:257: backgroundHtmlParserPendingTokenLimit type=int, initial=0 On 2015/06/11 18:48:23, Nate Chapin wrote: ...
4 years, 10 months ago (2015-06-12 14:12:59 UTC) #5
Nate Chapin
LGTM https://codereview.chromium.org/1175183006/diff/1/Source/core/html/parser/HTMLDocumentParser.cpp File Source/core/html/parser/HTMLDocumentParser.cpp (right): https://codereview.chromium.org/1175183006/diff/1/Source/core/html/parser/HTMLDocumentParser.cpp#newcode786 Source/core/html/parser/HTMLDocumentParser.cpp:786: if (document()->settings()) { On 2015/06/12 14:12:59, Bryan McQuade ...
4 years, 10 months ago (2015-06-12 17:03:00 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1175183006/20001
4 years, 10 months ago (2015-06-13 00:45:07 UTC) #8
commit-bot: I haz the power
4 years, 10 months ago (2015-06-13 00:48:37 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197074

Powered by Google App Engine
This is Rietveld 408576698