Uh oh!
There was an error while loading. Please reload this page.
perf(@angular/build): replace watchpack with @parcel/watcher and chokidar - #33656
perf(@angular/build): replace watchpack with @parcel/watcher and chokidar#33656clydin wants to merge 1 commit into
Conversation
a757036 to
9ed830dCompareafa5b29 to
160848aCompareThere was a problem hiding this comment.
Code Review
This pull request replaces watchpack with a custom file watcher implementation that utilizes @parcel/watcher with a chokidar fallback, updating the build action and adding unit tests. The review feedback identifies several critical issues in the new watcher implementation: path traversal bugs on Windows drive roots when using path.posix.dirname, incorrect case-sensitivity detection for non-existent directories, potential unhandled promise rejections from floating unsubscribe promises, and early termination of the cleanup loop if an unsubscription fails.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
160848a to
a1fed21Compare…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 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.
a1fed21 to
37f97d1Compare
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 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.