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

Issue 12382022: Speeding up Node.nodes.addAll (Closed)

Created:
7 years, 9 months ago by blois
Modified:
7 years, 9 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Speeding up Node.nodes.addAll During profiling of the Dart API app I noticed quite a non-trivial amount of time and garbage in nodes.addAll. This case can be optimized for the case where we know that both lists are node lists. BUG= Committed: https://code.google.com/p/dart/source/detail?r=19268

Patch Set 1 : #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -3 lines) Patch
M sdk/lib/html/dart2js/html_dart2js.dart View 1 chunk +7 lines, -1 line 0 comments Download
M sdk/lib/html/dartium/html_dartium.dart View 1 chunk +7 lines, -1 line 0 comments Download
M tools/dom/templates/html/impl/impl_Node.darttemplate View 1 chunk +7 lines, -1 line 6 comments Download

Messages

Total messages: 8 (0 generated)
blois
Note that this copy was added to fix http://dartbug.com/6684, but that the workarounds for this ...
7 years, 9 months ago (2013-02-28 19:39:33 UTC) #1
Siggi Cherem (dart-lang)
lgtm https://codereview.chromium.org/12382022/diff/2001/tools/dom/templates/html/impl/impl_Node.darttemplate File tools/dom/templates/html/impl/impl_Node.darttemplate (right): https://codereview.chromium.org/12382022/diff/2001/tools/dom/templates/html/impl/impl_Node.darttemplate#newcode72 tools/dom/templates/html/impl/impl_Node.darttemplate:72: if (iterable is _ChildNodeListLazy) { is it worth ...
7 years, 9 months ago (2013-02-28 19:43:32 UTC) #2
blois
https://codereview.chromium.org/12382022/diff/2001/tools/dom/templates/html/impl/impl_Node.darttemplate File tools/dom/templates/html/impl/impl_Node.darttemplate (right): https://codereview.chromium.org/12382022/diff/2001/tools/dom/templates/html/impl/impl_Node.darttemplate#newcode72 tools/dom/templates/html/impl/impl_Node.darttemplate:72: if (iterable is _ChildNodeListLazy) { On 2013/02/28 19:43:32, Siggi ...
7 years, 9 months ago (2013-02-28 20:45:58 UTC) #3
Jennifer Messerly
lgtm
7 years, 9 months ago (2013-02-28 21:08:16 UTC) #4
blois
Committed patchset #1 manually as r19268 (presubmit successful).
7 years, 9 months ago (2013-03-01 00:03:41 UTC) #5
Siggi Cherem (dart-lang)
lgtm https://codereview.chromium.org/12382022/diff/2001/tools/dom/templates/html/impl/impl_Node.darttemplate File tools/dom/templates/html/impl/impl_Node.darttemplate (right): https://codereview.chromium.org/12382022/diff/2001/tools/dom/templates/html/impl/impl_Node.darttemplate#newcode72 tools/dom/templates/html/impl/impl_Node.darttemplate:72: if (iterable is _ChildNodeListLazy) { On 2013/02/28 20:45:58, ...
7 years, 9 months ago (2013-03-01 00:05:27 UTC) #6
sra1
A couple of things that might make a few percent more difference since they avoid ...
7 years, 9 months ago (2013-03-01 01:17:59 UTC) #7
sra1
7 years, 9 months ago (2013-03-01 01:28:46 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/12382022/diff/2001/tools/dom/templates/html/i...
File tools/dom/templates/html/impl/impl_Node.darttemplate (right):

https://codereview.chromium.org/12382022/diff/2001/tools/dom/templates/html/i...
tools/dom/templates/html/impl/impl_Node.darttemplate:76:
_this.$dom_appendChild(iterable[0]);
On 2013/03/01 01:17:59, sra1 wrote:
> iterable.first should be slightly faster.

or, better, iterable._this.$dom_firstChild

Powered by Google App Engine
This is Rietveld 408576698