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

Unified Diff: third_party/WebKit/PerformanceTests/Mutation/append-child-with-ranges.html

Issue 2034023003: Make appendChild/insertBefore faster with active ranges (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-06-06T14:17:03 Adopt for review comments Created 4 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ContainerNode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/PerformanceTests/Mutation/append-child-with-ranges.html
diff --git a/third_party/WebKit/PerformanceTests/Mutation/append-child-with-ranges.html b/third_party/WebKit/PerformanceTests/Mutation/append-child-with-ranges.html
new file mode 100644
index 0000000000000000000000000000000000000000..3795428eec51c908caaa9e7d0bfdbdaede076458
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Mutation/append-child-with-ranges.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- Identical to "append-child.html" but having 100 active ranges -->
+<body>
+<pre id="log"></pre>
+<script src="../resources/runner.js"></script>
+<div id="sandbox" style="display:none"></div>
+<script>
+var elems = [];
+for (var i = 0; i < 50000; ++i)
+ elems[i] = document.createElement('div');
+
+var ranges = [];
+for (var i = 0; i < 100; ++i) {
+ var range = new Range();
+ ranges[i] = range;
+ range.selectNodeContents(document.body);
+}
+
+var sandbox = document.getElementById('sandbox');
+
+PerfTestRunner.measureRunsPerSecond({
+ description: 'Measures performance of appendChild with active Range objects',
+ run: function() {
+ for (var elem of elems)
+ sandbox.appendChild(elem);
+ }
+});
+</script>
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ContainerNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698