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;
|
lView[adjustedIndex] = native;
|
||||||
|
|
||||||
const previousOrParentTNode = getPreviousOrParentTNode();
|
const previousOrParentTNode = getPreviousOrParentTNode();
|
||||||
const isParent = getIsParent();
|
|
||||||
let tNode = tView.data[adjustedIndex] as TNode;
|
let tNode = tView.data[adjustedIndex] as TNode;
|
||||||
if (tNode == null) {
|
if (tNode == null) {
|
||||||
|
const isParent = getIsParent();
|
||||||
const parent =
|
const parent =
|
||||||
isParent ? previousOrParentTNode : previousOrParentTNode && previousOrParentTNode.parent;
|
isParent ? previousOrParentTNode : previousOrParentTNode && previousOrParentTNode.parent;
|
||||||
|
|
||||||
|
@ -282,10 +282,9 @@ export function createNodeAtIndex(
|
||||||
previousOrParentTNode.next = tNode;
|
previousOrParentTNode.next = tNode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (index === 0) {
|
||||||
|
tView.firstChild = tNode;
|
||||||
if (tView.firstChild == null) {
|
}
|
||||||
tView.firstChild = tNode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setPreviousOrParentTNode(tNode);
|
setPreviousOrParentTNode(tNode);
|
||||||
|
|
Loading…
Reference in New Issue