Skip to content

perf(@angular-devkit/build-angular): load postcss-preset-env configuration once#20913

Merged
clydin merged 1 commit intoangular:masterfrom
JoostK:perf/postcss-preset-env-once
May 24, 2021
Merged

perf(@angular-devkit/build-angular): load postcss-preset-env configuration once#20913
clydin merged 1 commit intoangular:masterfrom
JoostK:perf/postcss-preset-env-once

Conversation

@JoostK
Copy link
Copy Markdown
Member

@JoostK JoostK commented May 23, 2021

Loading the postcss-preset-env plugin includes building a mapping of unsupported
browsers by feature, which is somewhat expensive. In large compilations, this mapping
would be recomputed for each postcss-loader instance, as the plugin was recreated
for each loader invocation. By extracting the plugin instance outside of the dynamic
plugin computation, this overhead is avoided.

image

…ation once

Loading the postcss-preset-env plugin includes building a mapping of unsupported
browsers by feature, which is somewhat expensive. In large compilations, this mapping
would be recomputed for each postcss-loader instance, as the plugin was recreated
for each loader invocation. By extracting the plugin instance outside of the dynamic
plugin computation, this overhead is avoided.
@google-cla google-cla bot added the cla: yes label May 23, 2021
Comment thread packages/angular_devkit/build_angular/src/webpack/configs/styles.ts
@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label May 24, 2021
@JoostK JoostK marked this pull request as ready for review May 24, 2021 16:53
@JoostK JoostK requested a review from alan-agius4 May 24, 2021 16:53
Copy link
Copy Markdown
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

Thanks!

@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label May 24, 2021
@clydin clydin merged commit 640a749 into angular:master May 24, 2021
@angular-automatic-lock-bot
Copy link
Copy Markdown

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 24, 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.

3 participants