perf(ivy): limit global state read / write in host bindings (#33195)
PR Close #33195
This commit is contained in:
parent
aef7dca234
commit
3e14c2d02c
|
@ -539,7 +539,6 @@ export function createDirectivesInstances(
|
|||
if ((tNode.flags & TNodeFlags.hasHostBindings) === TNodeFlags.hasHostBindings) {
|
||||
invokeDirectivesHostBindings(tView, lView, tNode);
|
||||
}
|
||||
setActiveHostElement(null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1118,7 +1117,6 @@ function invokeDirectivesHostBindings(tView: TView, viewData: LView, tNode: TNod
|
|||
const expando = tView.expandoInstructions !;
|
||||
const firstTemplatePass = tView.firstTemplatePass;
|
||||
const elementIndex = tNode.index - HEADER_OFFSET;
|
||||
const selectedIndex = getSelectedIndex();
|
||||
try {
|
||||
setActiveHostElement(elementIndex);
|
||||
|
||||
|
@ -1135,7 +1133,7 @@ function invokeDirectivesHostBindings(tView: TView, viewData: LView, tNode: TNod
|
|||
}
|
||||
}
|
||||
} finally {
|
||||
setActiveHostElement(selectedIndex);
|
||||
setActiveHostElement(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue