Skip to content

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

Open
alan-agius4 wants to merge 1 commit into
angular:mainfrom
alan-agius4:perf/sass-cache-reset
Open

alan-agius4 wants to merge 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer 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.

1 participant