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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/runner.js"></script>
3 <div id="container"></div>
4 <script>
5 'use strict';
6
7 PerfTestRunner.measureRunsPerSecond({
8 description: 'Adds, then lays out, a long list of sibling elements ' +
9 'separated by spaces',
10 setup: () => {
11 container.parentNode.replaceChild(container.cloneNode(false), container);
12 PerfTestRunner.gc();
13 },
14 run: () => {
15 const num_words = 1000;
16 for (let i = 0; i < num_words; i++) {
17 let a = document.createElement('a');
18 a.append(i);
19 container.append(a);
20 container.append(' ');
21 }
22 PerfTestRunner.forceLayout();
23 }
24 });
25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698