fix: bound concurrent Sass renders - #712
Merged
johnjenkins merged 1 commit intoAug 6, 2026
Merged
Conversation
wessmeister
marked this pull request as ready for review
August 6, 2026 12:10
Contributor
|
thanks again for the great contribution, this was released in v3.3.3 |
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.
Pull request checklist
pnpm run build) was run locally and passed.pnpm test) were run locally and passed.pnpm run prettier) was run locally and passed.Pull request type
What is the current behavior?
Each concurrent transform calls
sass-embedded's legacyrender()API. That API creates a compiler process per call, so Dart Sass process fan-out currently grows with the number of in-flight stylesheets.GitHub Issue Number: #711
Closes #711.
What is the new behavior?
maxConcurrentWorkersvalue, which currently defaults to 8 and becomes 4 in CI.0still allows one render at a time, so disabling Stencil workers cannot deadlock Sass compilation.Does this introduce a breaking change?
Testing
Added regression coverage that reproduced six simultaneous renders with
maxConcurrentWorkers: 2before the change and now observes a peak of two.Covered
maxConcurrentWorkers: 0and confirmed queued work continues after a Sass compilation error.pnpm run build, all 41 unit tests, formatting, package dry run, and the Stencil v4 integration fixture pass.The public 50-component reproduction produced the following results:
The stock peak varies with process scheduling. The patched build remained at Stencil's configured limit of 8. All 152 files in the generated component output were byte-identical.
A 200-component run also remained capped at 8 Dart processes.
Other information
Using a reusable
AsyncCompilerwould avoid process startup per transform, but its public modern API cannot consume this plugin's legacy importer and function options. This patch preserves that compatibility while fixing the unbounded process fan-out. It does not prevent a later migration to the modern API.