Title: [286954] trunk/PerformanceTests
- Revision
- 286954
- Author
- cathiec...@igalia.com
- Date
- 2021-12-13 10:13:44 -0800 (Mon, 13 Dec 2021)
Log Message
[Performance test] Add test lots-of-self-painting-layers.html
https://bugs.webkit.org/show_bug.cgi?id=233684
Reviewed by Rob Buis.
This test is a transform of the test [1] in blink. It uses position: relative to create
lots of self-painting layers. By changing the first layer's height, it tracks the repaint
performance of these self-painting layers.
[1] third_party/blink/perf_tests/layout/contain-content-style-change.html
* Paint/lots-of-self-painting-layers.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/PerformanceTests/ChangeLog (286953 => 286954)
--- trunk/PerformanceTests/ChangeLog 2021-12-13 17:53:55 UTC (rev 286953)
+++ trunk/PerformanceTests/ChangeLog 2021-12-13 18:13:44 UTC (rev 286954)
@@ -1,3 +1,18 @@
+2021-12-13 Cathie Chen <cathiec...@igalia.com>
+
+ [Performance test] Add test lots-of-self-painting-layers.html
+ https://bugs.webkit.org/show_bug.cgi?id=233684
+
+ Reviewed by Rob Buis.
+
+ This test is a transform of the test [1] in blink. It uses position: relative to create
+ lots of self-painting layers. By changing the first layer's height, it tracks the repaint
+ performance of these self-painting layers.
+
+ [1] third_party/blink/perf_tests/layout/contain-content-style-change.html
+
+ * Paint/lots-of-self-painting-layers.html: Added.
+
2021-12-08 Alan Bujtas <za...@apple.com>
Add layout performance test for simple bidi content with inline boxes
Added: trunk/PerformanceTests/Paint/lots-of-self-painting-layers.html (0 => 286954)
--- trunk/PerformanceTests/Paint/lots-of-self-painting-layers.html (rev 0)
+++ trunk/PerformanceTests/Paint/lots-of-self-painting-layers.html 2021-12-13 18:13:44 UTC (rev 286954)
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<script src=""
+<title>Tracking the performance of self-painting layers</title>
+<style>
+ #listContainer {
+ margin: 0 auto;
+ width: 600px;
+ position: relative;
+ }
+
+ .listItem {
+ outline: 2px solid green;
+ overflow: hidden;
+ position: relative;
+ }
+</style>
+</head>
+
+<body>
+ <pre id="log"></pre>
+
+ <div id="listContainer"></div>
+ <script>
+ const LOREM_IPSUM = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
+
+ let listContainer = null;
+ function createListItem() {
+ let item = document.createElement("div");
+ item.classList.add("listItem");
+ item.textContent = LOREM_IPSUM.substr(
+ Math.floor(Math.random() * 100), Math.floor(Math.random() * 200) + 150);
+ listContainer.appendChild(item);
+ }
+
+ function setupTest() {
+ listContainer = document.getElementById("listContainer");
+ for (let i = 0; i < 10000; ++i)
+ createListItem();
+ document.body.getBoundingClientRect();
+ window.requestAnimationFrame(runTest);
+ }
+
+ var isDone = false;
+ PerfTestRunner.prepareToMeasureValuesAsync({ done: done, unit: 'ms' });
+ function done() {
+ isDone = true;
+ listContainer.innerHTML = "";
+ }
+
+ var startTime;
+ var height = 0;
+ function runTest() {
+ if (startTime)
+ PerfTestRunner.measureValueAsync(PerfTestRunner.now() - startTime);
+
+ if (!isDone) {
+ startTime = PerfTestRunner.now();
+ listContainer.firstChild.style.height = height + "px";
+ height++;
+ window.requestAnimationFrame(runTest);
+ }
+ }
+
+ _onload_ = setupTest;
+ </script>
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes