-
Notifications
You must be signed in to change notification settings - Fork 25.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve performance of ngc in bazel / blaze #19581
Conversation
You can preview 10a15b1 at https://pr19581-10a15b1.ngbuilds.io/. |
You can preview dfaee55 at https://pr19581-dfaee55.ngbuilds.io/. |
This helps hazel as it does not check libraries (e.g. the default lib) which are not input files, but still checks `.d.ts` files that are inputs.
You can preview b021793 at https://pr19581-b021793.ngbuilds.io/. |
aa23164
to
7cb1c0c
Compare
You can preview 7cb1c0c at https://pr19581-7cb1c0c.ngbuilds.io/. |
@@ -20,6 +20,8 @@ const NGC_GEN_FILES = /^(.*?)\.(ngfactory|ngsummary|ngstyle|shim\.ngstyle)(.*)$/ | |||
// knows about them | |||
const NGC_ASSETS = /\.(css|html|ngsummary\.json)$/; | |||
|
|||
const BLAZE_BIN = /\bblaze-out\b.*?\bbin\b/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's surprising to see this here - would it be hard to implement this in the first-party ngc-wrapped instead?
@@ -160,6 +162,15 @@ export function compile({allowNonHermeticReads, compilerOpts, tsHost, bazelOpts, | |||
relativeToRootDirs(importedFilePath, compilerOpts.rootDirs).replace(EXT, ''); | |||
ngHost.toSummaryFileName = (fileName: string, referringSrcFileName: string) => | |||
ngHost.fileNameToModuleName(fileName, referringSrcFileName); | |||
if (blazeBin) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eg. you could introduce
bazelOpts.restrictSummaryResolution: string
and set it to the blaze-bin rootDirs[x] value in first-party
then just use the presence of that bazelOpt here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Introduced an argument allDepsCompiledWithBazel
for now, which is true inside of G3 but false outside.
For hazel, we have a specific way of writing summaries, which we can leverage to make the deserialization faster.
You can preview 0bef4b8 at https://pr19581-0bef4b8.ngbuilds.io/. |
For hazel, we have a specific way of writing summaries, which we can leverage to make the deserialization faster. PR Close angular#19581
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. |
No description provided.