perf(ivy): limit memory reads in getOrCreateNodeInjectorForNode (#33102)
PR Close #33102
This commit is contained in:
parent
b800b88224
commit
dcca80bb1e
|
@ -155,14 +155,13 @@ export function getOrCreateNodeInjectorForNode(
|
||||||
}
|
}
|
||||||
|
|
||||||
const parentLoc = getParentInjectorLocation(tNode, hostView);
|
const parentLoc = getParentInjectorLocation(tNode, hostView);
|
||||||
const parentIndex = getParentInjectorIndex(parentLoc);
|
|
||||||
const parentLView = getParentInjectorView(parentLoc, hostView);
|
|
||||||
|
|
||||||
const injectorIndex = tNode.injectorIndex;
|
const injectorIndex = tNode.injectorIndex;
|
||||||
|
|
||||||
// If a parent injector can't be found, its location is set to -1.
|
// If a parent injector can't be found, its location is set to -1.
|
||||||
// In that case, we don't need to set up a cumulative bloom
|
// In that case, we don't need to set up a cumulative bloom
|
||||||
if (hasParentInjector(parentLoc)) {
|
if (hasParentInjector(parentLoc)) {
|
||||||
|
const parentIndex = getParentInjectorIndex(parentLoc);
|
||||||
|
const parentLView = getParentInjectorView(parentLoc, hostView);
|
||||||
const parentData = parentLView[TVIEW].data as any;
|
const parentData = parentLView[TVIEW].data as any;
|
||||||
// Creates a cumulative bloom filter that merges the parent's bloom filter
|
// Creates a cumulative bloom filter that merges the parent's bloom filter
|
||||||
// and its own cumulative bloom (which contains tokens for all ancestors)
|
// and its own cumulative bloom (which contains tokens for all ancestors)
|
||||||
|
|
Loading…
Reference in New Issue