perf(@ngtools/webpack): only process dependent packages with NGCC#17884
perf(@ngtools/webpack): only process dependent packages with NGCC#17884mgechev merged 1 commit intoangular:masterfrom alan-agius4:ngcc-use-program-dependencies
Conversation
With this change we consume the change in angular/angular#37075 where the NGCC now exposes a new option `--use-program-dependencies`, to only process packages which are part of the TypeScript program. From the initial benchmarking the time taken for NGCC to process that dependencies needed for an `ng new` application went down by 36% from 10526ms to 6708ms.
petebacondarwin
left a comment
There was a problem hiding this comment.
36% improvement per line! Looks good to me :-)
|
The real concern is actually if it slows down the processing of large application because we now scan all their source files as part of the ngcc processing (even if the node_modules have all been processed already). |
|
@petebacondarwin let's take this offline. |
|
Testing it locally with a dummy 800 component files the NOOP regressed by 200ms. |
|
In a large real world application (super-productivity) a NOOP regressed from 1129.807ms to 4685.788ms. |
|
On another application which was shared privately with the team. The timings of a noop increased from 687.110ms to 1342.186ms. |
|
I ran some tests on super-productivity using the directory-walker and program-based entry-point finders. See below. I would say that in large projects like this the cost of the program-based finder, is not significant in the bigger picture of the overall build. In fact the variation in the overall build on my machine was so wide that the total build time actually decreased in the "noop" case between the directory-walker and the program-based entry-point finder runs.
|
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
With this change we consume the change in angular/angular#37075 where the NGCC now exposes a new option
--use-program-dependencies, to only process packages which are part of the TypeScript program.From the initial benchmarking the time taken for NGCC to process that dependencies needed for an
ng newapplication went down by 36% from 10526ms to 6708ms.