refactor(@angular/build): replace maxThreads with maxConcurrency option in i18n inliner - #33993
Open
clydin wants to merge 1 commit into
Open
refactor(@angular/build): replace maxThreads with maxConcurrency option in i18n inliner#33993clydin wants to merge 1 commit into
clydin wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the I18nInliner class to accept maxConcurrency as an option within the I18nInlinerOptions object instead of a separate constructor argument. It also adds validation to ensure maxConcurrency is an integer greater than or equal to 1, and updates the corresponding unit tests. The feedback suggests simplifying the conditional object spread when initializing the WorkerPool by passing options.maxConcurrency directly, which improves code readability.
…on in i18n inliner The I18nInliner constructor previously accepted an optional maxThreads parameter as a second argument, while sliding window sizing and batch sharding calculations accessed this.#workerPool.maxThreads directly. This couples the inliner concurrency planning to the worker pool construction argument and makes it awkward to configure when using or moving toward shared worker pools. This change adds maxConcurrency to I18nInlinerOptions and removes the separate maxThreads constructor parameter. The internal #maxConcurrency getter prioritizes options.maxConcurrency before falling back to the worker pool thread count. All call sites and tests now pass maxConcurrency through the options object.
clydin
force-pushed
the
refactor/i18n-inliner-max-concurrency
branch
from
September 2, 2026 15:09
7cc5199 to
1d48a37
Compare
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.
The
I18nInlinerconstructor previously accepted an optionalmaxThreadsparameter as a second argument, while sliding window sizing and batch sharding calculations accessedthis.#workerPool.maxThreadsdirectly. This couples the inliner concurrency planning to the worker pool construction argument and makes it awkward to configure when using or moving toward shared worker pools.This change adds maxConcurrency to
I18nInlinerOptionsand removes the separatemaxThreadsconstructor parameter. The internal#maxConcurrencygetter prioritizesoptions.maxConcurrencybefore falling back to the worker pool thread count. All call sites and tests now passmaxConcurrencythrough the options object.