Skip to content

Commit

Permalink
Bug 1873649: Add regression perf test. r=firefox-style-system-reviewe…
Browse files Browse the repository at this point in the history
…rs,perftest-reviewers,emilio,sparky, a=dmeehan

Differential Revision: https://phabricator.services.mozilla.com/D198209
  • Loading branch information
dshin-moz committed Jan 11, 2024
1 parent 8453e0a commit 5c241eb
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
3 changes: 2 additions & 1 deletion testing/talos/talos/tests/perf-reftest-singletons/README
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ To add a test:
iii) The test steps.
iv) A call to perf_finish().
3) Add your test to the perf_reftest_singletons.manifest file.
4) Add your test to the list in build/pgo/index.html.
4) Add your test to the list in build/pgo/index.html, if it should be used
for profile-guided optimization.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# When modifying this list, please also update build/pgo/index.html.
# When modifying this list, please also update build/pgo/index.html (If relevant to profile-guided optimzation).
% http://localhost/tests/perf-reftest-singletons/abspos-reflow-1.html
% http://localhost/tests/perf-reftest-singletons/attr-selector-1.html
% http://localhost/tests/perf-reftest-singletons/bidi-resolution-1.html
Expand Down Expand Up @@ -35,4 +35,5 @@
% http://localhost/tests/perf-reftest-singletons/svg-text-getExtentOfChar-1.html
% http://localhost/tests/perf-reftest-singletons/tiny-traversal-singleton.html
% http://localhost/tests/perf-reftest-singletons/window-named-property-get.html
# When modifying this list, please also update build/pgo/index.html.
% http://localhost/tests/perf-reftest-singletons/remove-children.html
# When modifying this list, please also update build/pgo/index.html (If relevant to profile-guided optimzation).
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>

0 comments on commit 5c241eb

Please sign in to comment.