Skip to content

Commit 36bdf27

Browse files
committed
docs(docs): say which limits apply to slow components, pipe hosts and deep injector trees
- Slowest components ranks only the first 1000 classes a recording checks - targetTotal counts distinct host elements, and a combined report keeps 10 of them across all pages - The injector tree also leaves out injectors nested past 1000 levels Refs #366, #367, #369
1 parent 056bfc3 commit 36bdf27

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎apps/docs/src/content/agents/resources.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The signal graph of each page, under `pages[pageId]`. `graph` is the latest one.
6060

6161
### injector-tree
6262

63-
The injector hierarchy the page last reported, with the providers at each level. Each page is under `pages[pageId]`. `roots` and `environment` are the latest. Element injectors list what their components and directives inject in `dependencies`. Environment injectors list what the services they already created inject, with `from` naming the service or `InjectionToken`. `zone` is the change detection mode: `zoneless`, `zone` (zone.js) or `zone-unused` (zoneless, with zone.js still loaded). `truncated` is `true` when the page has more than 2000 element injectors and reported only the first 2000, or more than 2500 injectors in all. The server drops malformed nodes and clips long names.
63+
The injector hierarchy the page last reported, with the providers at each level. Each page is under `pages[pageId]`. `roots` and `environment` are the latest. Element injectors list what their components and directives inject in `dependencies`. Environment injectors list what the services they already created inject, with `from` naming the service or `InjectionToken`. `zone` is the change detection mode: `zoneless`, `zone` (zone.js) or `zone-unused` (zoneless, with zone.js still loaded). `truncated` is `true` when the tree was cut: it keeps at most 2000 element injectors and 2500 injectors in all, and leaves out injectors nested more than 1000 levels deep. The server drops malformed nodes and clips long names.
6464

6565
### ngrx-store
6666

‎apps/docs/src/content/agents/tools.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ The injectors a page reported. Element injectors list what each component inject
187187

188188
A `selector` that names an element injector returns it with its lookup path resolved to names and provided tokens. One that names an environment injector, in any case, returns that injector's providers, what the services it already created inject, and its parent injectors. When nothing matches, the answer lists the tags and environment injector names on the page to retry with.
189189

190-
Without `selector` or `token`, the answer is the whole tree and says which change detection mode the page runs. The answer stays within 20,000 characters and its JSON always parses. A larger tree shows element injectors as an outline (id, name, type, component, and provider and dependency counts), and when that is still too long it leaves out the deepest injectors and says how many. The environment injectors are always there, as an outline when they are large, and without their deepest injectors when even that outline is too long. A `selector` or `token` answer that is too long keeps whole entries and says how many it shows. `selector` and `token` take at most 500 characters each. When the page reported only part of its injector tree (it stops at 2000 element injectors, 2500 in all), the answer says so.
190+
Without `selector` or `token`, the answer is the whole tree and says which change detection mode the page runs. The answer stays within 20,000 characters and its JSON always parses. A larger tree shows element injectors as an outline (id, name, type, component, and provider and dependency counts), and when that is still too long it leaves out the deepest injectors and says how many. The environment injectors are always there, as an outline when they are large, and without their deepest injectors when even that outline is too long. A `selector` or `token` answer that is too long keeps whole entries and says how many it shows. `selector` and `token` take at most 500 characters each. When the page reported only part of its injector tree (it keeps at most 2000 element injectors and 2500 in all, and leaves out injectors nested more than 1000 levels deep), the answer says so.
191191

192192
## NgRx
193193

‎apps/docs/src/content/inspectors/components.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Below the tree and the defer blocks, the **Change detection** section records ch
9393
- **Latest cycles**, newest first: the start time, the duration, how many components Angular checked, how many sync passes it ran, the output listener that ran just before the cycle (an output that ended more than 50 ms before the cycle is not counted), and the slowest component in it.
9494
- Tree rows show how many times each instance was checked while recording.
9595

96-
**Slowest components** draws on the 100 component classes with the most self time, and tree rows count checks for up to 2000 instances. When a recording checks more classes or instances, a note in the section says how many were left out.
96+
**Slowest components** shows the 100 component classes with the most self time among the first 1000 classes a recording checks. A class first checked after those 1000 has no totals, so it isn't ranked. Tree rows count checks for up to 2000 instances. When a recording checks more classes or instances, a note in the section says how many were left out.
9797

9898
Recording is off by default. While it is off, the page registers no profiler for it. The page keeps the last 200 cycles, set with [`limits.cdCycles`](../getting-started/configuration.md#limits). Recording needs Angular 20 or later. On older versions, the section says so. Times come from a development build, so they are higher than in production.
9999

‎apps/docs/src/content/inspectors/injectors.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ See [Tools](../agents/tools.md) and [Resources](../agents/resources.md).
137137

138138
### Up to 2000 element injectors
139139

140-
The page reports at most 2000 element injectors. Environment injectors are kept after them, up to 2500 injectors in all, so they never push element injectors out. When the page cuts either part of the tree, a notice above the tree says the page reported only part of its injector tree, and a lookup path or a provider can point to an injector that isn't listed. `inspect-providers` says it too.
140+
The page reports at most 2000 element injectors. Environment injectors are kept after them, up to 2500 injectors in all, so they never push element injectors out. Injectors nested more than 1000 levels deep are left out too. When any of these limits cuts the tree, a notice above the tree says the page reported only part of its injector tree, and a lookup path or a provider can point to an injector that isn't listed. `inspect-providers` says it too.
141141

142142
### Some injectors can't be highlighted
143143

‎apps/docs/src/content/inspectors/pipes.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ It runs only while recording. It reads the template source, so it needs an unmin
160160

161161
### Highlighting keeps 10 hosts per component
162162

163-
A component chip keeps up to 10 host elements per page to highlight. When a component has more instances, `pangular:pipe-usage` carries their number in `targetTotal`.
163+
A component chip keeps up to 10 host elements per page to highlight. When a component has more, `pangular:pipe-usage` gives the number of distinct host elements in `targetTotal`. A report that combines pages keeps at most 10 host elements per component across all pages, and its `targetTotal` adds up the host elements of every page.
164164

165165
### Recording ends on reload
166166

0 commit comments

Comments
 (0)