From 083d48e072c2f468f81ca496ab1b8888d749a41f Mon Sep 17 00:00:00 2001 From: Pawel Kozlowski Date: Thu, 31 Oct 2019 16:23:21 +0100 Subject: [PATCH] perf(ivy): avoid native node retrieval from LView (#33511) PR Close #33511 --- packages/core/src/render3/instructions/container.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/render3/instructions/container.ts b/packages/core/src/render3/instructions/container.ts index 3bc8f87df2eeb..e0a27e59d097c 100644 --- a/packages/core/src/render3/instructions/container.ts +++ b/packages/core/src/render3/instructions/container.ts @@ -17,7 +17,7 @@ import {FLAGS, HEADER_OFFSET, InitPhaseState, LView, LViewFlags, RENDERER, TVIEW import {assertNodeType} from '../node_assert'; import {appendChild, removeView} from '../node_manipulation'; import {getBindingIndex, getCheckNoChangesMode, getIsParent, getLView, getPreviousOrParentTNode, setIsNotParent, setPreviousOrParentTNode} from '../state'; -import {getNativeByTNode, load} from '../util/view_utils'; +import {load} from '../util/view_utils'; import {addToViewTree, createDirectivesInstances, createLContainer, createTNode, createTView, getOrCreateTNode, resolveDirectives, saveResolvedLocalsInData} from './shared'; @@ -185,7 +185,7 @@ function containerInternal( const lContainer = lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode); appendChild(comment, tNode, lView); - attachPatchData(getNativeByTNode(tNode, lView), lView); + attachPatchData(comment, lView); // Containers are added to the current view tree instead of their embedded views // because views can be removed and re-inserted.