Skip to content

Conversation

@xiaoxiaojx
Copy link
Member

@xiaoxiaojx xiaoxiaojx commented Dec 4, 2025

Summary
Fixes angular/angular-cli#31350

What kind of change does this PR introduce?
refactor

  1. Sort each module only once by deferring to finishUpdateParent(),
    avoiding redundant sorts on the same module
  2. Reduce traversal count and complexity in sortWithSourceOrder by
    caching WeakMap values upfront

Did you add tests for your changes?
Existing

Does this PR introduce a breaking change?
No

If relevant, what needs to be documented once your changes are merged or what have you already documented?
Nothing

@changeset-bot
Copy link

changeset-bot bot commented Dec 4, 2025

🦋 Changeset detected

Latest commit: 97d6027

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
webpack Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 4, 2025

CodSpeed Performance Report

Merging #20204 will not alter performance

Comparing xiaoxiaojx:perf/updateParent (97d6027) with main (1c22eb9)

Summary

✅ 69 untouched

@alexander-akait alexander-akait merged commit 4baab4e into webpack:main Dec 5, 2025
51 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

This PR is packaged and the instant preview is available (4baab4e).

Install it locally:

  • npm
npm i -D webpack@https://pkg.pr.new/webpack@4baab4e
  • yarn
yarn add -D webpack@https://pkg.pr.new/webpack@4baab4e
  • pnpm
pnpm add -D webpack@https://pkg.pr.new/webpack@4baab4e

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dramatic increase in build time for @angular-devkit/build-angular >= 20.2.x

2 participants