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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLParserScheduler.cpp

Issue 2386893002: Reformat comments in core/html/parser (Closed)
Patch Set: self review Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698