From 9cd510abaacc9393d34e680be0352866149d1aa3 Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Tue, 9 Jun 2015 11:41:08 -0700 Subject: [PATCH] =?UTF-8?q?perf(render):=20don=E2=80=99t=20create=20an=20i?= =?UTF-8?q?ntermediate=20element=20array=20in=20renderer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/angular2/src/render/dom/dom_renderer.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/angular2/src/render/dom/dom_renderer.ts b/modules/angular2/src/render/dom/dom_renderer.ts index 178f725557..5618e97717 100644 --- a/modules/angular2/src/render/dom/dom_renderer.ts +++ b/modules/angular2/src/render/dom/dom_renderer.ts @@ -237,10 +237,6 @@ export class DomRenderer extends Renderer { elementsWithBindingsDynamic = DOM.getElementsByClassName(rootElementClone, NG_BINDING_CLASS); viewRootNodes = [rootElementClone]; } - var elementsWithBindings = ListWrapper.createFixedSize(elementsWithBindingsDynamic.length); - for (var binderIdx = 0; binderIdx < elementsWithBindingsDynamic.length; ++binderIdx) { - elementsWithBindings[binderIdx] = elementsWithBindingsDynamic[binderIdx]; - } var binders = protoView.elementBinders; var boundTextNodes = []; @@ -258,7 +254,7 @@ export class DomRenderer extends Renderer { element = protoView.isTemplateElement ? null : rootElementClone; childNodes = DOM.childNodes(rootElementClone); } else { - element = elementsWithBindings[binderIdx - protoView.rootBindingOffset]; + element = elementsWithBindingsDynamic[binderIdx - protoView.rootBindingOffset]; childNodes = DOM.childNodes(element); }