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

Unified Diff: third_party/WebKit/PerformanceTests/DOM/long-sibling-list.html

Issue 2379483002: Use the sibling limit to decide whether to create layout for whitespace (Closed)
Patch Set: Bring patch to head. Created 4 years, 2 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/PerformanceTests/DOM/long-sibling-list.html
diff --git a/third_party/WebKit/PerformanceTests/DOM/long-sibling-list.html b/third_party/WebKit/PerformanceTests/DOM/long-sibling-list.html
new file mode 100644
index 0000000000000000000000000000000000000000..fb418b51ed5bc6f87a52ee07fe5ac6380521193d
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/DOM/long-sibling-list.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<script src="../resources/runner.js"></script>
+<div id="container"></div>
+<script>
+'use strict';
+
+PerfTestRunner.measureRunsPerSecond({
+ description: 'Adds, then lays out, a long list of sibling elements ' +
+ 'separated by spaces',
+ setup: () => {
+ container.parentNode.replaceChild(container.cloneNode(false), container);
+ PerfTestRunner.gc();
+ },
+ run: () => {
+ const num_words = 1000;
+ for (let i = 0; i < num_words; i++) {
+ let a = document.createElement('a');
+ a.append(i);
+ container.append(a);
+ container.append(' ');
+ }
+ PerfTestRunner.forceLayout();
+ }
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698