You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ead4fa9
Browse filesBrowse the repository at this point in the historyBrowse files
fixup! test(@angular/build): add library builder scaling benchmark suite
Adds a `--builder` axis (library, ng-packagr) so fixtures can be generated in either builder's project shape for A/B benchmarking. Fixtures only; no results recorded.
|`library`|`@angular/build:library`| One root `package.json` with a flat `exports` map; no `ng-package.json`. |
71
+
|`ng-packagr`|`@angular/build:ng-packagr`| Root `ng-package.json` (`dest`, `lib.entryFile`) plus one `ng-package.json` per secondary entry point; no `exports` map. |
72
+
73
+
Defaults to `library` only. Pass `--builder=library,ng-packagr` for an A/B run: the builder is the
74
+
innermost loop, so the two builds of an identical fixture size run back to back. `inline-scss`
75
+
sets `inlineStyleLanguage` on the builder for `library` and in `ng-package.json` for `ng-packagr`.
76
+
63
77
### Style-flavor matrix
64
78
65
79
`--style-flavor` is a second, independent sweep axis (crossed with `--layout` and the
|`--builder=<b,b,...>`| Builders to benchmark, one or more of `library`, `ng-packagr`. Pass both for an A/B run |`library`|
116
131
|`--count=<n,n,...>`| Entry-point count targets, drives both layouts |`10,20,50,100,200,300,400,500,1000,2000`|
117
132
|`--depth=<n,n,...>`|**`layout=deep` only.** Explicit tree depths, overriding the depths otherwise derived from `--count`| derived from `--count`|
118
133
|`--style-flavor=<f,f,...>`| Style-flavor targets (see "Style-flavor matrix" above), one or more of `inline`, `inline-css`, `inline-scss`, `external`, `external-css`, `external-scss`|`inline`|
@@ -133,6 +148,12 @@ Sweep the flat layout at a single size:
Sweep the full style-flavor matrix at a single size, both layouts:
137
158
138
159
```sh
@@ -219,9 +240,30 @@ Verification performed:
219
240
- Verified `--style-flavor` rejects an unrecognized flavor name with a clear error listing the
220
241
valid set, consistent with existing `--layout`/`--count`/`--depth` validation.
221
242
243
+
### 2026-10-22: Fixtures and harness prepared for A/B runs (no results yet)
244
+
245
+
Added the `--builder` axis (see "Builder axis (A/B)" above): the fixture generator can now emit
246
+
`ng-packagr`-shaped projects (per-entry-point `ng-package.json`) next to the native builder's
247
+
`exports`-map projects, and `builder` is part of the JSON/CSV output.
248
+
249
+
This entry is preparation only -- **no benchmark results are recorded here**. Verification performed:
250
+
251
+
-`--count=5` with both layouts, all 6 style flavors, both builders, `--iterations=1`: all 24
252
+
builds completed with `status: "ok"`.
253
+
- Inspected `ng-packagr` output for a `deep`/`external-scss` fixture: every secondary entry point
254
+
was built and bundled, and the per-entry SCSS variable compiled to a literal color, i.e. the
255
+
fixtures exercise the same work on both builders.
256
+
-`--builder` rejects an unrecognized name with a clear error listing the valid set.
257
+
- A reduced, throwaway sweep (flat, counts 10/50/200, 2 iterations, once per builder) ran cleanly
258
+
on both builders. Those numbers are deliberately not recorded: they are a smoke test, not a
259
+
measurement.
260
+
261
+
We now have a basis for a first real A/B run. The full sweep takes hours and needs proper
262
+
preparation (quiet machine, fixed environment, enough iterations) before it is worth running.
263
+
222
264
## Future Work
223
265
224
-
- A/B comparison against `ng-packagr` (both are already registered Architect builders — `@angular/build:ng-packagr`and `@angular/build:library` — so this is a same-builder-package comparison, not a separate tool invocation).
266
+
-First real A/B run against `ng-packagr` (`--builder=library,ng-packagr`; the fixture generation and harness support are in place, see 2026-10-22). Needs a quiet machine and the full default sweep.
225
267
- Full style-flavor matrix sweep (default `--count` sweep x 6 flavors x 2 layouts) to quantify the actual performance impact of stylesheet processing and external file reads, now that the matrix is implemented.
226
268
- Dependencies between entry points.
227
269
- Shared stylesheet tokens imported by multiple components.
0 commit comments