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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ContainerNode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!-- Identical to "append-child.html" but having 100 active ranges -->
3 <body>
4 <pre id="log"></pre>
5 <script src="../resources/runner.js"></script>
6 <div id="sandbox" style="display:none"></div>
7 <script>
8 var elems = [];
9 for (var i = 0; i < 50000; ++i)
10 elems[i] = document.createElement('div');
11
12 var ranges = [];
13 for (var i = 0; i < 100; ++i) {
14 var range = new Range();
15 ranges[i] = range;
16 range.selectNodeContents(document.body);
17 }
18
19 var sandbox = document.getElementById('sandbox');
20
21 PerfTestRunner.measureRunsPerSecond({
22 description: 'Measures performance of appendChild with active Range objects' ,
23 run: function() {
24 for (var elem of elems)
25 sandbox.appendChild(elem);
26 }
27 });
28 </script>
29 </body>
OLDNEW
« 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