-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
feat(ivy): ngtsc incremental compilation improvements #30238
Closed
petebacondarwin
wants to merge
4
commits into
angular:master
from
petebacondarwin:ngtsc-partial-eval-tracking
Closed
feat(ivy): ngtsc incremental compilation improvements #30238
petebacondarwin
wants to merge
4
commits into
angular:master
from
petebacondarwin:ngtsc-partial-eval-tracking
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
petebacondarwin
added
area: performance
state: WIP
area: core
Issues related to the framework runtime
target: major
This PR is targeted for the next major release
comp: ivy
labels
May 2, 2019
petebacondarwin
force-pushed
the
ngtsc-partial-eval-tracking
branch
from
May 2, 2019 14:17
7e64d5a
to
bb8f018
Compare
petebacondarwin
changed the title
feat(ivy): track file dependencies due to partial evaluation
feat(ivy): ngtsc incremental compilation improvements
May 2, 2019
petebacondarwin
force-pushed
the
ngtsc-partial-eval-tracking
branch
4 times, most recently
from
May 3, 2019 16:05
74fcb5b
to
abf1b20
Compare
petebacondarwin
force-pushed
the
ngtsc-partial-eval-tracking
branch
from
May 3, 2019 20:39
abf1b20
to
32e333a
Compare
petebacondarwin
added
action: review
The PR is still awaiting reviews from at least one requested reviewer
and removed
state: WIP
labels
May 3, 2019
This comment has been minimized.
This comment has been minimized.
petebacondarwin
force-pushed
the
ngtsc-partial-eval-tracking
branch
from
May 5, 2019 08:31
32e333a
to
38181ce
Compare
petebacondarwin
commented
May 5, 2019
petebacondarwin
force-pushed
the
ngtsc-partial-eval-tracking
branch
5 times, most recently
from
May 8, 2019 14:25
ff3073b
to
eab50ba
Compare
petebacondarwin
commented
May 8, 2019
packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.ts
Outdated
Show resolved
Hide resolved
petebacondarwin
commented
May 8, 2019
packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.ts
Outdated
Show resolved
Hide resolved
petebacondarwin
force-pushed
the
ngtsc-partial-eval-tracking
branch
from
May 8, 2019 15:09
eab50ba
to
bfcfda7
Compare
petebacondarwin
added
action: cleanup
The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews
and removed
action: review
The PR is still awaiting reviews from at least one requested reviewer
labels
May 10, 2019
No behavioural changes.
As part of incremental compilation performance improvements, we need to track the dependencies of files due to expressions being evaluated by the `PartialEvaluator`. The `PartialEvaluator` now accepts a `DependencyTracker` object, which is used to track which files are visited when evaluating an expression. The interpreter computes this `originatingFile` and stores it in the evaluation `Context` so it can pass this to the `DependencyTracker. The `IncrementalState` object implements this interface, which allows it to be passed to the `PartialEvaluator` and so capture the file dependencies.
To support skipping analysis of a file containing a component we need to know that none of the declarations that might affect its ngtsc compilation have not changed. The files that we need to check are those that contain classes from the `CompilationScope` of the component. These classes are already tracked in the `LocalModuleScopeRegistry`. This commit modifies the `IvyCompilation` class to record the files that are in each declared class's `CompilationScope` via a new method, `recordNgModuleScopeDependencies()`, that is called after all the handlers have been "resolved". Further, if analysis is skipped for a declared class, then we need to recover the analysis from the previous compilation run. To support this, the `IncrementalState` class has been updated to expose the `MetadataReader` and `MetadataRegistry` interfaces. This is included in the `metaRegistry` object to capture these analyses, and also in the `localMetaReader` as a fallback to use if the current compilation analysis was skipped.
Now that the dependent files and compilation scopes are being tracked in the incremental state, we can skip analysing and emitting source files if none of their dependent files have changed since the last compile. The computation of what files (and their dependencies) are unchanged is computed during reconciliation. This commit also removes the previous emission skipping logic, since this approach covers those cases already.
petebacondarwin
force-pushed
the
ngtsc-partial-eval-tracking
branch
from
May 10, 2019 08:00
b2af684
to
d1ce34f
Compare
petebacondarwin
added
action: merge
The PR is ready for merge by the caretaker
and removed
action: cleanup
The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews
labels
May 10, 2019
alxhub
pushed a commit
that referenced
this pull request
May 10, 2019
As part of incremental compilation performance improvements, we need to track the dependencies of files due to expressions being evaluated by the `PartialEvaluator`. The `PartialEvaluator` now accepts a `DependencyTracker` object, which is used to track which files are visited when evaluating an expression. The interpreter computes this `originatingFile` and stores it in the evaluation `Context` so it can pass this to the `DependencyTracker. The `IncrementalState` object implements this interface, which allows it to be passed to the `PartialEvaluator` and so capture the file dependencies. PR Close #30238
alxhub
pushed a commit
that referenced
this pull request
May 10, 2019
To support skipping analysis of a file containing a component we need to know that none of the declarations that might affect its ngtsc compilation have not changed. The files that we need to check are those that contain classes from the `CompilationScope` of the component. These classes are already tracked in the `LocalModuleScopeRegistry`. This commit modifies the `IvyCompilation` class to record the files that are in each declared class's `CompilationScope` via a new method, `recordNgModuleScopeDependencies()`, that is called after all the handlers have been "resolved". Further, if analysis is skipped for a declared class, then we need to recover the analysis from the previous compilation run. To support this, the `IncrementalState` class has been updated to expose the `MetadataReader` and `MetadataRegistry` interfaces. This is included in the `metaRegistry` object to capture these analyses, and also in the `localMetaReader` as a fallback to use if the current compilation analysis was skipped. PR Close #30238
alxhub
pushed a commit
that referenced
this pull request
May 10, 2019
Now that the dependent files and compilation scopes are being tracked in the incremental state, we can skip analysing and emitting source files if none of their dependent files have changed since the last compile. The computation of what files (and their dependencies) are unchanged is computed during reconciliation. This commit also removes the previous emission skipping logic, since this approach covers those cases already. PR Close #30238
BioPhoton
pushed a commit
to BioPhoton/angular
that referenced
this pull request
May 21, 2019
No behavioural changes. PR Close angular#30238
BioPhoton
pushed a commit
to BioPhoton/angular
that referenced
this pull request
May 21, 2019
…#30238) As part of incremental compilation performance improvements, we need to track the dependencies of files due to expressions being evaluated by the `PartialEvaluator`. The `PartialEvaluator` now accepts a `DependencyTracker` object, which is used to track which files are visited when evaluating an expression. The interpreter computes this `originatingFile` and stores it in the evaluation `Context` so it can pass this to the `DependencyTracker. The `IncrementalState` object implements this interface, which allows it to be passed to the `PartialEvaluator` and so capture the file dependencies. PR Close angular#30238
BioPhoton
pushed a commit
to BioPhoton/angular
that referenced
this pull request
May 21, 2019
…ar#30238) To support skipping analysis of a file containing a component we need to know that none of the declarations that might affect its ngtsc compilation have not changed. The files that we need to check are those that contain classes from the `CompilationScope` of the component. These classes are already tracked in the `LocalModuleScopeRegistry`. This commit modifies the `IvyCompilation` class to record the files that are in each declared class's `CompilationScope` via a new method, `recordNgModuleScopeDependencies()`, that is called after all the handlers have been "resolved". Further, if analysis is skipped for a declared class, then we need to recover the analysis from the previous compilation run. To support this, the `IncrementalState` class has been updated to expose the `MetadataReader` and `MetadataRegistry` interfaces. This is included in the `metaRegistry` object to capture these analyses, and also in the `localMetaReader` as a fallback to use if the current compilation analysis was skipped. PR Close angular#30238
BioPhoton
pushed a commit
to BioPhoton/angular
that referenced
this pull request
May 21, 2019
Now that the dependent files and compilation scopes are being tracked in the incremental state, we can skip analysing and emitting source files if none of their dependent files have changed since the last compile. The computation of what files (and their dependencies) are unchanged is computed during reconciliation. This commit also removes the previous emission skipping logic, since this approach covers those cases already. PR Close angular#30238
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this pull request
May 28, 2019
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.
filipesilva
added a commit
to filipesilva/angular
that referenced
this pull request
May 28, 2019
14 tasks
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this pull request
May 28, 2019
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.
filipesilva
added a commit
to filipesilva/angular-cli
that referenced
this pull request
May 28, 2019
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.
IgorMinar
pushed a commit
that referenced
this pull request
May 28, 2019
Followup to #29380, #30238, angular/angular-cli#14537. PR Close #30697
IgorMinar
pushed a commit
that referenced
this pull request
May 28, 2019
Followup to #29380, #30238, angular/angular-cli#14537. PR Close #30697
alexeagle
pushed a commit
to angular/angular-cli
that referenced
this pull request
Jun 6, 2019
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.
alexeagle
pushed a commit
to angular/angular-cli
that referenced
this pull request
Jun 6, 2019
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
action: merge
The PR is ready for merge by the caretaker
area: core
Issues related to the framework runtime
area: performance
cla: yes
target: major
This PR is targeted for the next major release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ngtsc incremental compilation improvements (FW-1241)
Tried out on AIO and seems to be faster. By logging I can see that it is definitely not analysing large numbers of files now.