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

Side by Side Diff: third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-visible-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 <style>td { border: 1px solid blue }</style> 4 <style>td { border: 1px solid blue }</style>
5 <script> 5 <script>
6 function createTable(rows, columns) { 6 function createTable(rows, columns) {
7 var table = document.createElement("TABLE"); 7 var table = document.createElement("TABLE");
8 // Collapsing border is not necessary to see the slowness 8 // Collapsing border is not necessary to see the slowness
9 // but it makes the painting phase ~2x slower. 9 // but it makes the painting phase ~2x slower.
10 table.style.borderCollapse = "collapse"; 10 table.style.borderCollapse = "collapse";
11 for (var i = 0; i < rows; ++i) { 11 for (var i = 0; i < rows; ++i) {
12 var tr = document.createElement("TR"); 12 var tr = document.createElement("TR");
13 for (var j = 0; j < columns; ++j) { 13 for (var j = 0; j < columns; ++j) {
14 var td = document.createElement("TD"); 14 var td = document.createElement("TD");
15 tr.appendChild(td); 15 tr.appendChild(td);
16 } 16 }
17 table.appendChild(tr); 17 table.appendChild(tr);
18 } 18 }
19 return table; 19 return table;
20 } 20 }
21 21
22 var table = createTable(300, 320); 22 var table = createTable(400, 400);
23 document.body.appendChild(table); 23 document.body.appendChild(table);
24 24
25 var ix = 30; 25 var ix = 30;
26 var iy = 30; 26 var iy = 30;
27 27
28 PerfTestRunner.measureFrameTime({ 28 PerfTestRunner.measureFrameTime({
29 run: function() { 29 run: function() {
30 table.childNodes[iy].childNodes[ix].style.backgroundColor = 'teal'; 30 table.childNodes[iy].childNodes[ix].style.backgroundColor = 'teal';
31 ix++; 31 ix++;
32 iy++; 32 iy++;
33 }, 33 },
34 warmUpCount: 5, 34 warmUpCount: 5,
35 }); 35 });
36 </script> 36 </script>
37 </body> 37 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698