| Index: third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp b/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp
|
| index 82378e43754026e3143b7752857ac620be2763de..383f23f3ab505995f8a3c309f5c4bedbc95a6e94 100644
|
| --- a/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp
|
| +++ b/third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp
|
| @@ -113,14 +113,14 @@ inline bool HTMLParserScheduler::shouldYield(
|
| if (session.elapsedTime() > parserTimeLimit)
|
| return true;
|
|
|
| - // Yield if a lot of DOM work has been done in this session and a script tag is
|
| - // about to be parsed. This significantly improves render performance for documents
|
| - // that place their scripts at the bottom of the page. Yielding too often
|
| - // significantly slows down the parsing so a balance needs to be struck to
|
| - // only yield when enough changes have happened to make it worthwhile.
|
| - // Emperical testing shows that anything > ~40 and < ~200 gives all of the benefit
|
| - // without impacting parser performance, only adding a few yields per page but at
|
| - // just the right times.
|
| + // Yield if a lot of DOM work has been done in this session and a script tag
|
| + // is about to be parsed. This significantly improves render performance for
|
| + // documents that place their scripts at the bottom of the page. Yielding too
|
| + // often significantly slows down the parsing so a balance needs to be struck
|
| + // to only yield when enough changes have happened to make it worthwhile.
|
| + // Emperical testing shows that anything > ~40 and < ~200 gives all of the
|
| + // benefit without impacting parser performance, only adding a few yields per
|
| + // page but at just the right times.
|
| const size_t sufficientWork = 50;
|
| if (startingScript && session.processedElementTokens() > sufficientWork)
|
| return true;
|
|
|