Title: [143649] trunk/Source/WebCore
Revision
143649
Author
to...@chromium.org
Date
2013-02-21 13:46:26 -0800 (Thu, 21 Feb 2013)

Log Message

Tune BackgroundHTMLParser's pendingTokenLimit based on a benchmark
https://bugs.webkit.org/show_bug.cgi?id=110408

Reviewed by Adam Barth.

This constant was tuned by running the top 25 sites in Telemetry on a Nexus 7 device.
The new value decreases the maximum time spent parsing by 40% without significantly impacting total parse time or DOMContentLoaded.

No new tests because no new functionality.

* html/parser/BackgroundHTMLParser.cpp:
(WebCore):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (143648 => 143649)


--- trunk/Source/WebCore/ChangeLog	2013-02-21 21:40:16 UTC (rev 143648)
+++ trunk/Source/WebCore/ChangeLog	2013-02-21 21:46:26 UTC (rev 143649)
@@ -1,3 +1,18 @@
+2013-02-21  Tony Gentilcore  <to...@chromium.org>
+
+        Tune BackgroundHTMLParser's pendingTokenLimit based on a benchmark
+        https://bugs.webkit.org/show_bug.cgi?id=110408
+
+        Reviewed by Adam Barth.
+
+        This constant was tuned by running the top 25 sites in Telemetry on a Nexus 7 device.
+        The new value decreases the maximum time spent parsing by 40% without significantly impacting total parse time or DOMContentLoaded.
+
+        No new tests because no new functionality.
+
+        * html/parser/BackgroundHTMLParser.cpp:
+        (WebCore):
+
 2013-02-21  Sheriff Bot  <webkit.review....@gmail.com>
 
         Unreviewed, rolling out r143419.

Modified: trunk/Source/WebCore/html/parser/BackgroundHTMLParser.cpp (143648 => 143649)


--- trunk/Source/WebCore/html/parser/BackgroundHTMLParser.cpp	2013-02-21 21:40:16 UTC (rev 143648)
+++ trunk/Source/WebCore/html/parser/BackgroundHTMLParser.cpp	2013-02-21 21:46:26 UTC (rev 143649)
@@ -112,8 +112,7 @@
         || (threadSafeMatch(tagName, fontTag) && (token.getAttributeItem(colorAttr) || token.getAttributeItem(faceAttr) || token.getAttributeItem(sizeAttr)));
 }
 
-// FIXME: Tune this constant based on a benchmark. The current value was chosen arbitrarily.
-static const size_t pendingTokenLimit = 4000;
+static const size_t pendingTokenLimit = 1000;
 
 BackgroundHTMLParser::BackgroundHTMLParser(PassRefPtr<WeakReference<BackgroundHTMLParser> > reference, PassOwnPtr<Configuration> config)
     : m_weakFactory(reference, this)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to