forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1873649: Add regression perf test. r=firefox-style-system-reviewe…
…rs,perftest-reviewers,emilio,sparky, a=dmeehan Differential Revision: https://phabricator.services.mozilla.com/D198209
- Loading branch information
Showing
3 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
testing/talos/talos/tests/perf-reftest-singletons/remove-children.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<table id="dut"> | ||
</table> | ||
<script src="util.js"></script> | ||
<script> | ||
window.onload = function() { | ||
// From https://build.opensuse.org/project/show/openSUSE:Leap:15.5 | ||
const N = 40000; | ||
let elements = new Array(N); | ||
// Add lots of rows with newline in between | ||
for (let i = 0; i < N; i++) { | ||
let d = document.createElement("tr"); | ||
dut.appendChild(d); | ||
elements[i] = d; | ||
dut.appendChild(document.createTextNode("\n")); | ||
} | ||
|
||
flush_layout(); | ||
perf_start(); | ||
// Delete all from front. Text nodes of newlines will accumulate | ||
// at the start of the table. | ||
for (let i = 0; i < elements.length; i++) { | ||
let d = elements[i]; | ||
d.remove(); | ||
} | ||
flush_layout(); | ||
perf_finish(); | ||
}; | ||
</script> | ||
<body></body> |