perf(ivy): clean up createNodeAtIndex for speed (#30453)
PR Close #30453
This commit is contained in:
parent
2545445ffb
commit
9ce9561737
|
@ -259,9 +259,9 @@ export function createNodeAtIndex(
|
|||
lView[adjustedIndex] = native;
|
||||
|
||||
const previousOrParentTNode = getPreviousOrParentTNode();
|
||||
const isParent = getIsParent();
|
||||
let tNode = tView.data[adjustedIndex] as TNode;
|
||||
if (tNode == null) {
|
||||
const isParent = getIsParent();
|
||||
const parent =
|
||||
isParent ? previousOrParentTNode : previousOrParentTNode && previousOrParentTNode.parent;
|
||||
|
||||
|
@ -282,10 +282,9 @@ export function createNodeAtIndex(
|
|||
previousOrParentTNode.next = tNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tView.firstChild == null) {
|
||||
tView.firstChild = tNode;
|
||||
if (index === 0) {
|
||||
tView.firstChild = tNode;
|
||||
}
|
||||
}
|
||||
|
||||
setPreviousOrParentTNode(tNode);
|
||||
|
|
Loading…
Reference in New Issue