Skip to content

Conversation

alan-agius4
Copy link
Collaborator

Since we rely on child compilations to compile components CSS, using the parallel option will cause a significant overhead because each compilation will need to spawn a worker, in this mode the worker limit is not be honored because css-minimizer-webpack-plugin spawn and calulators workers during the optimization phase of a compilation and not globally per instance hence causes OOM because a large number of workers to be spawned simultaneously.

Closes #20883

@google-cla google-cla bot added the cla: yes label May 21, 2021
@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label May 21, 2021
@alan-agius4 alan-agius4 requested a review from clydin May 21, 2021 10:23
@alan-agius4 alan-agius4 changed the title perf(@angular-devkit/build-angular): disable CSS optimization parallelism perf(@angular-devkit/build-angular): disable CSS optimization parallelism for components styles May 21, 2021
…lism for components styles

Since we rely on child compilations to compile components CSS, using the `parallel` option will cause a significant overhead because each compilation will need to spawn a worker, in this mode the worker limit is not be honored because `css-minimizer-webpack-plugin` spawn and calulators workers during the optimization phase of a compilation and not globally per instance hence causes OOM because a large number of workers to be spawned simultaneously.

Closes #20883
@alan-agius4 alan-agius4 requested a review from clydin May 21, 2021 12:34
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label May 21, 2021
@clydin clydin merged commit 1ab2ef9 into angular:master May 21, 2021
@alan-agius4 alan-agius4 deleted the remove-parallel-CssMinimizerPlugin branch May 21, 2021 17:28
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@angular-devkit/build-angular v12.0.1 uses too much memory compared to v12.0.0
2 participants