Skip to content

perf(@angular/build): replace watchpack with @parcel/watcher and chokidar - #33656

Draft
clydin wants to merge 1 commit into
angular:mainfrom
clydin:feat/replace-watchpack
Draft

perf(@angular/build): replace watchpack with @parcel/watcher and chokidar#33656
clydin wants to merge 1 commit into
angular:mainfrom
clydin:feat/replace-watchpack

Conversation

@clydin

@clydin clydin commented Jul 24, 2026

Copy link
Copy Markdown
Member

This change replaces the watchpack file watching dependency in @angular/build with @parcel/watcher as the primary native file watcher, while falling back to chokidar (v4) for polling or unsupported environments.

By leveraging @parcel/watcher's native C++ bindings (FSEvents, ReadDirectoryChangesW, inotify), file system watching is offloaded directly to OS kernel APIs, significantly reducing CPU and memory footprint during watch mode. Additionally, external directory watches are dynamically subsumed to minimize active native file handles, while early path filtering and event coalescing prevent redundant incremental rebuild triggers.

@clydin clydin added the target: minor This PR is targeted for the next minor release label Jul 24, 2026
@angular-robot angular-robot Bot added area: performance Issues related to performance area: @angular/build labels Jul 24, 2026
@clydin
clydin force-pushed the feat/replace-watchpack branch 5 times, most recently from a757036 to 9ed830d Compare July 28, 2026 10:56
@clydin
clydin force-pushed the feat/replace-watchpack branch 4 times, most recently from a4da6a1 to 71a6b22 Compare August 3, 2026 20:09
…idar

This change replaces the watchpack file watching dependency in @angular/build with @parcel/watcher as the primary native file watcher, while falling back to chokidar (v4) for polling or unsupported environments.

By leveraging @parcel/watcher's native C++ bindings (FSEvents, ReadDirectoryChangesW, inotify), file system watching is offloaded directly to OS kernel APIs, significantly reducing CPU and memory footprint during watch mode. Additionally, external directory watches are dynamically subsumed to minimize active native file handles, while early path filtering and event coalescing prevent redundant incremental rebuild triggers.
@clydin
clydin force-pushed the feat/replace-watchpack branch from 71a6b22 to 176799d Compare August 3, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: @angular/build area: performance Issues related to performance target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant