Update html5-full-render.html to load the HTML5 spec incrementally, closer to how the browser would
https://bugs.webkit.org/show_bug.cgi?id=69374
+ Unreviewed.
+
+ Per https://bugs.webkit.org/show_bug.cgi?id=69374#c7
+ updating the chunksize to be a bit smaller now that the total
+ size of the html5 spec is smaller than when I wrote the test.
+
+ This should increase the prevalence of style resolution in the
+ sample time, which more closely matches instrument samples
+ taken when loading the full page in Safari.
+
+ * Parser/html5-full-render.html:
+
+2011-10-04 Eric Seidel <eric@webkit.org>
+
+ Update html5-full-render.html to load the HTML5 spec incrementally, closer to how the browser would
+ https://bugs.webkit.org/show_bug.cgi?id=69374
+
Reviewed by James Robinson.
This should finally be able to provide us with a repeatable metric
// Larger chunk sizes will show more samples in line layout.
// Smaller chunk sizes run slower overall, as the per-chunk overhead is high.
// Testing on my machine has shown that we need 10-15 chunks before style resolution is always the top sample.
-var chunkSize = 750000; // 8mb / 750k = approx 12 chunks.
+var chunkSize = 500000; // 6.09mb / 500k = approx 13 chunks (thus 13 forced layouts/style resolves).
var chunkCount = Math.ceil(spec.length / chunkSize);
for (var chunkIndex = 0; chunkIndex < chunkCount; chunkIndex++) {
var chunk = spec.substring(chunkIndex * chunkSize, chunkSize);
// Note that we won't cause a style resolve until we've encountered the <body> element.
// Thus the number of chunks counted above is not exactly equal to the number of style resolves.
if (iframe.contentDocument.body)
- iframe.contentDocument.body.clientHeight; // Force a full style-resolve.
+ iframe.contentDocument.body.clientHeight; // Force a full layout/style-resolve.
}
iframe.contentDocument.close();