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

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

Issue 258013009: Make the HTMLDocumentParser yield more aggressively Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed chunk size changes Created 6 years, 8 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: Source/core/html/parser/HTMLParserScheduler.cpp
diff --git a/Source/core/html/parser/HTMLParserScheduler.cpp b/Source/core/html/parser/HTMLParserScheduler.cpp
index 61cb172ccae8990de673cc9d4634963ad5e2d19c..0765052e0a77a31cc68ab312dfe6a5cb52f4f2be 100644
--- a/Source/core/html/parser/HTMLParserScheduler.cpp
+++ b/Source/core/html/parser/HTMLParserScheduler.cpp
@@ -93,6 +93,12 @@ void HTMLParserScheduler::continueNextChunkTimerFired(Timer<HTMLParserScheduler>
void HTMLParserScheduler::scheduleForResume()
{
+ // FIXME: Currently Timers use the SharedTimer queue, so scheduling
+ // a 0ms timer here may cause the parser to resume again before
+ // returning to the Chromium MessageLoop, thus starving other tasks
+ // in the MessageLoop. This will be fixed by moving Blink's Timer
+ // class ontop of postTask, but until then we're probably missing
+ // frames with this implementation.
m_continueNextChunkTimer.startOneShot(0, FROM_HERE);
}

Powered by Google App Engine
This is Rietveld 408576698