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

Issue 2039113003: Make removeChild faster with active ranges (Closed)

Created:
4 years, 6 months ago by yosin_UTC9
Modified:
4 years, 6 months ago
Reviewers:
keishi, kouhei (in TOK)
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make removeChild/remove faster with active Range objects This patch makes |Node#removeChild()| and |Node#remove()| faster when there are active Range objects in document by using DOM tree version as offset validity instead of invalid offset value on node removal, which is done by |Range::nodeChildrenChanged()| via |Document::updateRangesAfterChildrenChanged()|. This patch is similar to http://crrev.com/2034023003, which makes appendChild and insertBefore faster. On my Linux box, "remove-child-with-ranges.html" (with 1000 |Range| objects) results are: w/patch: avg 0.96 runs/s, median 1.00 runs/s, min 0.80 runs/s, max 1.03 runs/s w/o patch: avg 0.69 runs/s, median 0.71 runs/s, min 0.56 runs/s, max 0.76 runs/s BUG=n/a TEST=PerformanceTests/Mutation/remove-child-with-ranges.html Committed: https://crrev.com/6d90de9c8429ea28e578ff42ed6e2d35d963722b Cr-Commit-Position: refs/heads/master@{#397993}

Patch Set 1 : 2016-06-06T14:55:55 #

Patch Set 2 : 2016-06-06T16:21:06 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -42 lines) Patch
A + third_party/WebKit/PerformanceTests/Mutation/remove-child-with-ranges.html View 1 3 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ContainerNode.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ContainerNode.cpp View 1 1 chunk +0 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Range.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Range.cpp View 1 1 chunk +0 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h View 1 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 9 (4 generated)
yosin_UTC9
PTAL Applying appendChild optimization to removeChild. It makes source code simpler too.
4 years, 6 months ago (2016-06-06 07:33:56 UTC) #3
kouhei (in TOK)
lgtm % test pass
4 years, 6 months ago (2016-06-06 07:39:11 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2039113003/20001
4 years, 6 months ago (2016-06-06 07:57:13 UTC) #6
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-06 09:08:46 UTC) #7
commit-bot: I haz the power
4 years, 6 months ago (2016-06-06 09:10:48 UTC) #9
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/6d90de9c8429ea28e578ff42ed6e2d35d963722b
Cr-Commit-Position: refs/heads/master@{#397993}

Powered by Google App Engine
This is Rietveld 408576698