Skip to content
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

LFrame #33178

Closed
wants to merge 3 commits into from
Closed

LFrame #33178

wants to merge 3 commits into from

Conversation

mhevery
Copy link
Contributor

@mhevery mhevery commented Oct 15, 2019

  • This PR introduces a concept of an LFrame. LFrame is just a collection of global state which the instructions used. (This is not a new concept just giving an explicit name to something which we had before but was unnamed)
  • Change all of the places where we enter/leave LFrame to use proper methods such as enterView and leaveView rather than having hap hazard enter/leave/save state methods.

NOTE: This PR does not change how the system works, it only groups things into mental concepts and gives the mental concept a proper name.

NOTE: There seems to be still variation in measurements.

┌────────────────────────────────────┬─────────┬──────┬───────────┬───────────┬───────┐
│              (index)               │  time   │ unit │ base_time │ base_unit │   %   │
├────────────────────────────────────┼─────────┼──────┼───────────┼───────────┼───────┤
│       directive_instantiate        │  2.377  │ 'us' │   2.507   │   'us'    │ -5.19 │
│        element_text_create         │  1.27   │ 'us' │   1.319   │   'us'    │ -3.71 │
│           interpolation            │ 215.629 │ 'us' │  224.217  │   'us'    │ -3.83 │
│             listeners              │  1.915  │ 'us' │   2.021   │   'us'    │ -5.24 │
│ map_based_style_and_class_bindings │ 18.632  │ 'ms' │  18.523   │   'ms'    │ 0.59  │
│       noop_change_detection        │ 24.076  │ 'us' │  24.874   │   'us'    │ -3.21 │
│          property_binding          │ 219.683 │ 'us' │  216.736  │   'us'    │ 1.36  │
│      property_binding_update       │ 424.953 │ 'us' │  447.686  │   'us'    │ -5.08 │
│      style_and_class_bindings      │ 988.936 │ 'us' │   1.069   │   'ms'    │ -7.49 │
│           style_binding            │ 502.821 │ 'us' │  484.092  │   'us'    │ 3.87  │
└────────────────────────────────────┴─────────┴──────┴───────────┴───────────┴───────┘```

@mhevery mhevery force-pushed the LFrame branch 2 times, most recently from a918cb7 to 7050674 Compare October 15, 2019 20:42
@mhevery mhevery marked this pull request as ready for review October 15, 2019 20:43
@mhevery mhevery requested review from a team as code owners October 15, 2019 20:43
.notes.md Outdated Show resolved Hide resolved
@mhevery mhevery added the area: core Issues related to the framework runtime label Oct 15, 2019
@ngbot ngbot bot added this to the needsTriage milestone Oct 15, 2019
@mhevery mhevery added the target: major This PR is targeted for the next major release label Oct 15, 2019
@mhevery mhevery force-pushed the LFrame branch 3 times, most recently from a5a97b4 to 747b754 Compare October 16, 2019 20:11
@mhevery
Copy link
Contributor Author

mhevery commented Oct 16, 2019

presubmit
ivy presubmit

@AndrewKushnir AndrewKushnir added the action: presubmit The PR is in need of a google3 presubmit label Oct 17, 2019
@AndrewKushnir
Copy link
Contributor

Restarting presubmits, since previous ones were not informative due to a set of pre-existing (non-related) failures that are now fixed.

@AndrewKushnir
Copy link
Contributor

FYI, Ivy presubmit indicated a target that regressed in g3, related to these changes. I'm adding "blocked" label for now.

@AndrewKushnir AndrewKushnir added state: blocked and removed action: presubmit The PR is in need of a google3 presubmit labels Oct 17, 2019
@mhevery mhevery requested a review from a team as a code owner October 17, 2019 05:12
@petebacondarwin petebacondarwin removed the request for review from a team October 17, 2019 18:48
@@ -167,7 +164,11 @@ export class ComponentFactory<T> extends viewEngine_ComponentFactory<T> {
rootViewInjector);

// rootView is the parent when bootstrapping
const oldLView = selectView(rootLView, null);
// TODO(misko): it looks like we are entering view here but we don't really need to as

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, we should fix it, I was toying with this once

Copy link
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thnx for resolving all my comments @mhevery

@AndrewKushnir AndrewKushnir added the action: presubmit The PR is in need of a google3 presubmit label Oct 23, 2019
@AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir added state: blocked and removed action: presubmit The PR is in need of a google3 presubmit labels Oct 23, 2019
@AndrewKushnir
Copy link
Contributor

FYI, g3 presubmits are successful.

I've added "blocked" label for now to avoid merging it before @kara's review.

Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like the direction of this! Minor comments

packages/core/src/render3/state.ts Outdated Show resolved Hide resolved
packages/core/src/render3/state.ts Outdated Show resolved Hide resolved
packages/core/src/render3/state.ts Outdated Show resolved Hide resolved
packages/core/src/render3/state.ts Outdated Show resolved Hide resolved
packages/core/src/render3/di.ts Outdated Show resolved Hide resolved
@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one more typo and moving the DI work to a new PR, as Pawel suggested.

packages/core/src/render3/state.ts Outdated Show resolved Hide resolved
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

@AndrewKushnir AndrewKushnir added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Oct 24, 2019
`LFrame` stores information specifice to the current `LView` As the code
enters and leaves `LView`s we use `enterView()` and `leaveView()`
respectively to build a a stack of `LFrame`s. This allows us to easily
restore the previous `LView` instruction state.
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@mhevery mhevery removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Oct 24, 2019
AndrewKushnir pushed a commit that referenced this pull request Oct 24, 2019
AndrewKushnir pushed a commit that referenced this pull request Oct 24, 2019
…on (#33178)

`LFrame` stores information specifice to the current `LView` As the code
enters and leaves `LView`s we use `enterView()` and `leaveView()`
respectively to build a a stack of `LFrame`s. This allows us to easily
restore the previous `LView` instruction state.

PR Close #33178
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 24, 2019
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 cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants