Skip to content

perf(@angular/build): only reset Sass worker pool caches when stylesheet files change - #34117

Merged
alan-agius4 merged 1 commit into
angular:mainfrom
alan-agius4:perf/sass-cache-reset
Sep 21, 2026
Merged

alan-agius4 merged 1 commit into
angular:mainfrom
alan-agius4:perf/sass-cache-reset

Conversation

@alan-agius4

Copy link
Copy Markdown
Collaborator

Avoid resetting the Sass worker pool caches during watch rebuilds if no stylesheet files (.scss, .sass, .css) were modified.

@angular-robot angular-robot Bot added area: performance Issues related to performance area: @angular/build labels Sep 18, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request optimizes the build process by conditionally resetting the Sass worker pool caches only when stylesheet changes (Sass, SCSS, or CSS) are detected. However, the current implementation attempts to call the ".some()" method on "changes.all", which is a Set and will result in a runtime TypeError. It is recommended to use a "for...of" loop to iterate over the set and check for stylesheet changes, allowing for an early exit.

Comment thread packages/angular/build/src/builders/application/build-action.ts
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: rc This PR is targeted for the next release-candidate labels Sep 18, 2026
@alan-agius4
alan-agius4 requested a review from clydin September 18, 2026 08:22
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 21, 2026
@alan-agius4
alan-agius4 merged commit 42eaa97 into angular:main Sep 21, 2026
44 checks passed
@alan-agius4
alan-agius4 deleted the perf/sass-cache-reset branch September 21, 2026 17:52
@alan-agius4

Copy link
Copy Markdown
Collaborator Author

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build area: performance Issues related to performance target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants