DescriptionMake 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. #
Messages
Total messages: 9 (3 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||