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
Perf logging & Incremental Compilation #29380
Conversation
@@ -6,6 +6,7 @@ | |||
* found in the LICENSE file at https://angular.io/license | |||
*/ | |||
import {ConstantPool} from '@angular/compiler'; | |||
import {NOOP_PERF_RECORDER} from '@angular/compiler-cli/src/ngtsc/perf'; |
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.
I don't think this is used.
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.
Looks great (just left a few nits) 👍
One question/proposal: may be add some test for PerfTracker logic?
packages/compiler-cli/src/ngcc/src/analysis/decoration_analyzer.ts
Outdated
Show resolved
Hide resolved
b5c8ffe
to
9f74b66
Compare
As far as tests go, I'd rather wait until we stabilize the logging format before we start explicitly testing it. |
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.
Looks great (just left a few minor nits)! 👍
This commit adds a `tracePerformance` option for tsconfig.json. When specified, it causes a JSON file with timing information from the ngtsc compiler to be emitted at the specified path. This tracing system is used to instrument the analysis/emit phases of compilation, and will be useful in debugging future integration work with @angular/cli. See ngtsc/perf/README.md for more details.
This commit adds support for compiling the same program repeatedly in a way that's similar to how incremental builds work in a tool such as the CLI. * support is added to the compiler entrypoint for reuse of the Program object between compilations. This is the basis of the compiler's incremental compilation model. * support is added to wrap the CompilerHost the compiler creates and cache ts.SourceFiles in between compilations. * support is added to track when files are emitted, for assertion purposes. * an 'exclude' section is added to the base tsconfig to prevent .d.ts outputs from the first compilation from becoming inputs to any subsequent compilations.
This commit introduces a mechanism for incremental compilation to the ngtsc compiler. Previously, incremental information was used in the construction of the ts.Program for subsequent compilations, but was not used in ngtsc itself. This commit adds an IncrementalState class, which tracks state between ngtsc compilations. Currently, this supports skipping the TypeScript emit step when the compiler can prove the contents of emit have not changed. This is implemented for @Injectables as well as for files which don't contain any Angular decorated types. These are the only files which can be proven to be safe today. See ngtsc/incremental/README.md for more details.
@alxhub thanks for answering questions and for additional changes! Everything looks great, I have no other questions/comments. 👍 |
I am the approver for compiler-cli. |
This commit adds support for compiling the same program repeatedly in a way that's similar to how incremental builds work in a tool such as the CLI. * support is added to the compiler entrypoint for reuse of the Program object between compilations. This is the basis of the compiler's incremental compilation model. * support is added to wrap the CompilerHost the compiler creates and cache ts.SourceFiles in between compilations. * support is added to track when files are emitted, for assertion purposes. * an 'exclude' section is added to the base tsconfig to prevent .d.ts outputs from the first compilation from becoming inputs to any subsequent compilations. PR Close #29380
This commit introduces a mechanism for incremental compilation to the ngtsc compiler. Previously, incremental information was used in the construction of the ts.Program for subsequent compilations, but was not used in ngtsc itself. This commit adds an IncrementalState class, which tracks state between ngtsc compilations. Currently, this supports skipping the TypeScript emit step when the compiler can prove the contents of emit have not changed. This is implemented for @Injectables as well as for files which don't contain any Angular decorated types. These are the only files which can be proven to be safe today. See ngtsc/incremental/README.md for more details. PR Close #29380
This commit adds a `tracePerformance` option for tsconfig.json. When specified, it causes a JSON file with timing information from the ngtsc compiler to be emitted at the specified path. This tracing system is used to instrument the analysis/emit phases of compilation, and will be useful in debugging future integration work with @angular/cli. See ngtsc/perf/README.md for more details. PR Close angular#29380
…ar#29380) This commit adds support for compiling the same program repeatedly in a way that's similar to how incremental builds work in a tool such as the CLI. * support is added to the compiler entrypoint for reuse of the Program object between compilations. This is the basis of the compiler's incremental compilation model. * support is added to wrap the CompilerHost the compiler creates and cache ts.SourceFiles in between compilations. * support is added to track when files are emitted, for assertion purposes. * an 'exclude' section is added to the base tsconfig to prevent .d.ts outputs from the first compilation from becoming inputs to any subsequent compilations. PR Close angular#29380
This commit introduces a mechanism for incremental compilation to the ngtsc compiler. Previously, incremental information was used in the construction of the ts.Program for subsequent compilations, but was not used in ngtsc itself. This commit adds an IncrementalState class, which tracks state between ngtsc compilations. Currently, this supports skipping the TypeScript emit step when the compiler can prove the contents of emit have not changed. This is implemented for @Injectables as well as for files which don't contain any Angular decorated types. These are the only files which can be proven to be safe today. See ngtsc/incremental/README.md for more details. PR Close angular#29380
Testing on AIO with Angular master as of 28/05/2019 I got these results: JIT ~414ms (369, 378, 408, 323, 593) AOT using VE ~1383ms (1365, 1185, 1767, 1135, 1467) AOT using Ivy ~517ms (600, 391, 444, 756, 394) This is largely due to angular/angular#29380 and angular/angular#30238. The second PR above was not merged to master, and thus will not be in 8.0.0. This PR should be merged to match it.
Testing on AIO with Angular master as of 28/05/2019 I got these results: JIT ~414ms (369, 378, 408, 323, 593) AOT using VE ~1383ms (1365, 1185, 1767, 1135, 1467) AOT using Ivy ~517ms (600, 391, 444, 756, 394) This is largely due to angular/angular#29380 and angular/angular#30238. The second PR above was not merged to master, and thus will not be in 8.0.0. This PR should be merged to match it.
Testing on AIO with Angular master as of 28/05/2019 I got these results: JIT ~414ms (369, 378, 408, 323, 593) AOT using VE ~1383ms (1365, 1185, 1767, 1135, 1467) AOT using Ivy ~517ms (600, 391, 444, 756, 394) This is largely due to angular/angular#29380 and angular/angular#30238. The second PR above was not merged to master, and thus will not be in 8.0.0. This PR should be merged to match it.
Followup to #29380, #30238, angular/angular-cli#14537. PR Close #30697
Followup to #29380, #30238, angular/angular-cli#14537. PR Close #30697
Testing on AIO with Angular master as of 28/05/2019 I got these results: JIT ~414ms (369, 378, 408, 323, 593) AOT using VE ~1383ms (1365, 1185, 1767, 1135, 1467) AOT using Ivy ~517ms (600, 391, 444, 756, 394) This is largely due to angular/angular#29380 and angular/angular#30238. The second PR above was not merged to master, and thus will not be in 8.0.0. This PR should be merged to match it.
Testing on AIO with Angular master as of 28/05/2019 I got these results: JIT ~414ms (369, 378, 408, 323, 593) AOT using VE ~1383ms (1365, 1185, 1767, 1135, 1467) AOT using Ivy ~517ms (600, 391, 444, 756, 394) This is largely due to angular/angular#29380 and angular/angular#30238. The second PR above was not merged to master, and thus will not be in 8.0.0. This PR should be merged to match it.
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.