Conversation
petebacondarwin
left a comment
There was a problem hiding this comment.
Nice work @JoostK. Thanks. LGTM - just a couple of minor comments that you can choose what to do with. Oh and the commit message has a typo: CLIs -> CLI's.
There was a problem hiding this comment.
| * all files that are imported from the file, while keeping the set of already seen files | |
| * all files that are imported from the file, while taking the set of already seen files |
There was a problem hiding this comment.
I thought that something sounded off here!
There was a problem hiding this comment.
Is it worth just checking the args to those three calls? Or at least the file arg?
There was a problem hiding this comment.
no-root sounds a bit weird to me. How about not-root?
…ultiple root files When ngcc is configured to run with the `--use-program-dependencies` flag, as is the case in the CLI's asynchronous processing, it will scan all source files in the program, starting from the program's root files as configured in the tsconfig. Each individual root file could potentially rescan files that had already been scanned for an earlier root file, causing a severe performance penalty if the number of root files is large. This would be the case if glob patterns are used in the "include" specification of a tsconfig file. This commit avoids the performance penalty by keeping track of the files that have been scanned across all root files, such that no source file is scanned multiple times. Fixes angular#39240
… from multiple root files
1063eab to
fe3c922
Compare
…ultiple root files (#39254) When ngcc is configured to run with the `--use-program-dependencies` flag, as is the case in the CLI's asynchronous processing, it will scan all source files in the program, starting from the program's root files as configured in the tsconfig. Each individual root file could potentially rescan files that had already been scanned for an earlier root file, causing a severe performance penalty if the number of root files is large. This would be the case if glob patterns are used in the "include" specification of a tsconfig file. This commit avoids the performance penalty by keeping track of the files that have been scanned across all root files, such that no source file is scanned multiple times. Fixes #39240 PR Close #39254
|
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. |
…ultiple root files
When ngcc is configured to run with the
--use-program-dependenciesflag, as is the case in the CLIs asynchronous processing, it will scan
all source files in the program, starting from the program's root files
as configured in the tsconfig. Each individual root file could
potentially rescan files that had already been scanned for an earlier
root file, causing a severe performance penalty if the number of root
files is large. This would be the case if glob patterns are used in the
"include" specification of a tsconfig file.
This commit avoids the performance penalty by keeping track of the files
that have been scanned across all root files, such that no source file
is scanned multiple times.
Fixes #39240