Repository navigation
test(@angular/build): add performance benchmark suite for i18n inliner - #34100
Conversation
Introduces an automated macro performance benchmark suite for the i18n inlining subsystem in @angular/build, executable via the benchmark command. The suite generates synthetic in-memory bundles, source maps, and translation catalogs to evaluate realistic workloads without checking large test fixtures into the repository. Benchmark scenarios cover standard applications with and without source maps, enterprise multilingual applications across 32 locales, monolithic bundles to verify 2D task sharding, and warm persistent cache throughput. Each scenario is executed in an isolated child process, and persistent cache priming is performed out-of-process to avoid cross-scenario memory contamination from the OS memory allocator. The harness collects high-precision timing, peak heap, peak RSS, and memory deltas with explicit garbage collection support. The runner is integrated into devkit-admin with support for baseline comparison, machine-readable JSON output, stale build detection, and automatic rebuilds.
10bc395 to
928a359
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a performance benchmark runner for the Angular CLI's i18n inliner subsystem, adding several scripts and utilities to manage scenarios, generate synthetic bundles, execute tests, and report results. The review feedback highlights three important areas for improvement: first, a potential SyntaxError in scenarios.mts when spawning a child process with evaluated ES module code without the --input-type=module flag; second, a lack of validation for numeric CLI options (iterations, warmup, and concurrency) which could result in NaN or division-by-zero errors; and third, incomplete error handling in index.mts where proc.error is not checked when spawnSync fails.
Adds a large-scale stress test scenario to the i18n inliner benchmark suite with 10,000 translation messages across 32 locales. The scenario generates a 3 MB main bundle and 100 route chunks with source maps, evaluating binary translation catalog encoding, small file batching, and memory scaling under maximum enterprise workloads.
928a359 to
ae6291b
Compare
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Introduces an automated macro performance benchmark suite for the i18n inlining subsystem in
@angular/build, executable via the benchmark command.The suite generates synthetic in-memory bundles, source maps, and translation catalogs to evaluate realistic workloads without checking large test fixtures into the repository.
Benchmark scenarios cover standard applications with and without source maps, enterprise multilingual applications across 32 locales, monolithic bundles to verify 2D task sharding, and warm persistent cache throughput.
Each scenario is executed in an isolated child process, and persistent cache priming is performed out-of-process to avoid cross-scenario memory contamination from the OS memory allocator. The harness collects high-precision timing, peak heap, peak RSS, and memory deltas with explicit garbage collection support.