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

Unified Diff: third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h

Issue 2065163005: ParseHTMLOnMainThread: notify main thread of chunks less frequently (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a setting to the experiment Created 4 years, 5 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/BackgroundHTMLParser.h
diff --git a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h
index 029fb08139a84e22e39a459fa63fa3cf2e3242c1..c3286ca8689863f1f0e72647a9892decdaf3f50c 100644
--- a/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h
+++ b/third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.h
@@ -62,6 +62,7 @@ public:
// pendingTokenLimit
size_t outstandingTokenLimit;
size_t pendingTokenLimit;
+ bool shouldCoalesceChunks;
};
static void start(PassRefPtr<WeakReference<BackgroundHTMLParser>>, std::unique_ptr<Configuration>, const KURL& documentURL, std::unique_ptr<CachedDocumentParameters>, const MediaValuesCached::MediaValuesCachedData&, std::unique_ptr<WebTaskRunner>);
@@ -95,7 +96,11 @@ private:
void appendDecodedBytes(const String&);
void markEndOfFile();
void pumpTokenizer();
- void sendTokensToMainThread();
+
+ // Returns whether or not the HTMLDocumentParser should be notified of
+ // pending chunks.
+ bool queueChunkForMainThread();
+ void notifyMainThreadOfNewChunks();
void updateDocument(const String& decodedData);
template <typename FunctionType, typename... Ps>
@@ -128,6 +133,7 @@ private:
bool m_startingScript;
double m_lastBytesReceivedTime;
+ bool m_shouldCoalesceChunks;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/frame/Settings.in ('k') | third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698