test(@angular/build): add performance benchmark suite for i18n inliner - #34100
Merged
Merged
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.
clydin
force-pushed
the
feat/i18n-inliner-benchmarks
branch
2 times, most recently
from
September 17, 2026 01:18
10bc395 to
928a359
Compare
clydin
marked this pull request as ready for review
September 17, 2026 01:18
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.
clydin
force-pushed
the
feat/i18n-inliner-benchmarks
branch
from
September 17, 2026 01:35
928a359 to
ae6291b
Compare
alan-agius4
approved these changes
Sep 17, 2026
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.