MCPcopy Create free account
hub / github.com/angular/angular / calcSerializedContainerSize

Function calcSerializedContainerSize

packages/core/src/hydration/utils.ts:482–489  ·  view source on GitHub ↗
(hydrationInfo: DehydratedView, index: number)

Source from the content-addressed store, hash-verified

480 * by calculating the sum of root nodes in all dehydrated views in this container.
481 */
482export function calcSerializedContainerSize(hydrationInfo: DehydratedView, index: number): number {
483 const views = getSerializedContainerViews(hydrationInfo, index) ?? [];
484 let numNodes = 0;
485 for (let view of views) {
486 numNodes += view[NUM_ROOT_NODES] * (view[MULTIPLIER] ?? 1);
487 }
488 return numNodes;
489}
490
491/**
492 * Attempt to initialize the `disconnectedNodes` field of the given

Callers 3

locateNextRNodeFunction · 0.90
getNgContainerSizeFunction · 0.85

Calls 1

Tested by

no test coverage detected