https://bugs.webkit.org/show_bug.cgi?id=69285
Reviewed by Adam Barth.
This was designed to be a test for https://bugs.webkit.org/show_bug.cgi?id=68944
But it seems that by far our dominating cost for the HTML5 benchmark is
time spent laying out lines (which isn't actually that surprising).
I'm adding the performance test for posterity.
* Parser/html-parser.html:
- Removed use of "about:blank" which abarth says is a no-op. Made comment more accurate.
* Parser/html5-full-render.html: Copied from PerformanceTests/Parser/html-parser.html.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96559
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
2011-10-03 Eric Seidel <eric@webkit.org>
+ Add a microbenchmark for a full-page render of the HTML5 spec
+ https://bugs.webkit.org/show_bug.cgi?id=69285
+
+ Reviewed by Adam Barth.
+
+ This was designed to be a test for https://bugs.webkit.org/show_bug.cgi?id=68944
+ But it seems that by far our dominating cost for the HTML5 benchmark is
+ time spent laying out lines (which isn't actually that surprising).
+
+ I'm adding the performance test for posterity.
+
+ * Parser/html-parser.html:
+ - Removed use of "about:blank" which abarth says is a no-op. Made comment more accurate.
+ * Parser/html5-full-render.html: Copied from PerformanceTests/Parser/html-parser.html.
+
+2011-10-03 Eric Seidel <eric@webkit.org>
+
PerformanceTests/Parser/html-parser is only testing parsing of the head element
https://bugs.webkit.org/show_bug.cgi?id=69283
start(20, function() {
var iframe = document.createElement("iframe");
- iframe.src = "about:blank";
iframe.style.display = "none"; // Prevent creation of the rendering tree, so we only test HTML parsing.
- iframe.sandbox = ''; // Prevents loading of external scripts which would otherwise pause the parser.
+ iframe.sandbox = ''; // Prevent external script loads which could cause write() to return before completing the parse.
document.body.appendChild(iframe);
iframe.contentDocument.open();
iframe.contentDocument.write(spec);
--- /dev/null
+<!DOCTYPE html>
+<body>
+<pre id="log"></pre>
+<script src="resources/runner.js"></script>
+<script>
+var spec = loadFile("resources/html5.html");
+
+// Each iteration currently takes 30s to run on a fast machine, so we only run 2.
+start(2, function() {
+ var iframe = document.createElement("iframe");
+ iframe.sandbox = ''; // Prevent external script loads which could cause write() to return before completing the parse.
+ document.body.appendChild(iframe);
+ iframe.contentDocument.open();
+ iframe.contentDocument.write(spec);
+ iframe.contentDocument.close();
+ iframe.contentDocument.body.clientHeight; // Force a full style-resolve.
+ document.body.removeChild(iframe);
+});
+</script>
+</body>