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

Side by Side Diff: third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-invisible-collapsed-borders.html

Issue 2564773003: Increase load of blink_perf.paint to reduce flakiness (Closed)
Patch Set: Fix a typo Created 4 years 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <script src="../resources/runner.js"></script> 3 <script src="../resources/runner.js"></script>
4 <script> 4 <script>
5 function createTable(rows, columns) { 5 function createTable(rows, columns) {
6 var table = document.createElement("TABLE"); 6 var table = document.createElement("TABLE");
7 // Collapsing border is not necessary to see the slowness 7 // Collapsing border is not necessary to see the slowness
8 // but it makes the painting phase ~2x slower. 8 // but it makes the painting phase ~2x slower.
9 table.style.borderCollapse = "collapse"; 9 table.style.borderCollapse = "collapse";
10 for (var i = 0; i < rows; ++i) { 10 for (var i = 0; i < rows; ++i) {
11 var tr = document.createElement("TR"); 11 var tr = document.createElement("TR");
12 for (var j = 0; j < columns; ++j) { 12 for (var j = 0; j < columns; ++j) {
13 var td = document.createElement("TD"); 13 var td = document.createElement("TD");
14 tr.appendChild(td); 14 tr.appendChild(td);
15 } 15 }
16 table.appendChild(tr); 16 table.appendChild(tr);
17 } 17 }
18 return table; 18 return table;
19 } 19 }
20 20
21 var table = createTable(300, 320); 21 var table = createTable(600, 600);
22 document.body.appendChild(table); 22 document.body.appendChild(table);
23 23
24 var ix = 30; 24 var ix = 30;
25 var iy = 30; 25 var iy = 30;
26 26
27 PerfTestRunner.measureFrameTime({ 27 PerfTestRunner.measureFrameTime({
28 run: function() { 28 run: function() {
29 table.childNodes[iy].childNodes[ix].style.backgroundColor = 'teal'; 29 table.childNodes[iy].childNodes[ix].style.backgroundColor = 'teal';
30 ix++; 30 ix++;
31 iy++; 31 iy++;
32 }, 32 },
33 warmUpCount: 5, 33 warmUpCount: 5,
34 }); 34 });
35 </script> 35 </script>
36 </body> 36 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698