Bug 1901515 Part 4 - Add a perf test that removes a child with lengthy text. r=perftest-reviewers,dholbert,sparky

Differential Revision: https://phabricator.services.mozilla.com/D213797
This commit is contained in:
Ting-Yu Lin
2024-06-17 16:40:18 +00:00
parent b533834cfd
commit e70fc47d4a
2 changed files with 19 additions and 0 deletions

View File

@@ -41,4 +41,5 @@
% http://localhost/tests/perf-reftest-singletons/insert-nth-edge-has-pseudo.html % http://localhost/tests/perf-reftest-singletons/insert-nth-edge-has-pseudo.html
% http://localhost/tests/perf-reftest-singletons/remove-children-positional-1.html % http://localhost/tests/perf-reftest-singletons/remove-children-positional-1.html
% http://localhost/tests/perf-reftest-singletons/remove-children-positional-2.html % http://localhost/tests/perf-reftest-singletons/remove-children-positional-2.html
% http://localhost/tests/perf-reftest-singletons/remove-child-with-lengthy-text.html
# When modifying this list, please also update build/pgo/index.html (If relevant to profile-guided optimzation). # When modifying this list, please also update build/pgo/index.html (If relevant to profile-guided optimzation).

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<script src="util.js"></script>
<pre><code id="code"></code></pre>
<script>
onload = function() {
const kLineCount = 5000;
let line = "The quick brown fox jumps over the lazy dog\n";
code.textContent = line.repeat(kLineCount);
flush_layout();
perf_start();
code.remove();
flush_layout();
perf_finish();
};
</script>