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

perf(ivy): avoid repeat LView reads in property instructions #32681

Closed
wants to merge 1 commit into from

Conversation

@crisbeto
Copy link
Member

commented Sep 14, 2019

Currently all property instructions eventually call into elementPropertyInternal which in turn calls to getLView, however all of the instructions already have access to the LView. These changes switch to passing in the LView as a parameter.

Currently all property instructions eventually call into `elementPropertyInternal` which in turn calls to `getLView`, however all of the instructions already have access to the LView. These changes switch to passing in the LView as a parameter.
@googlebot googlebot added the cla: yes label Sep 14, 2019
* @param directiveIndex Index of the directive in directives array
* @param instance Instance of the directive on which to set the initial inputs
* @param def The directive def that contains the list of inputs
* @param tNode The static data for this node
*/
function setInputsFromAttrs<T>(
directiveIndex: number, instance: T, def: DirectiveDef<T>, tNode: TNode): void {
lView: LView, directiveIndex: number, instance: T, def: DirectiveDef<T>, tNode: TNode): void {

This comment has been minimized.

Copy link
@alfaproject

alfaproject Sep 14, 2019

Contributor

If it's only needed for dev mode, maybe it's better to keep the method signature more lean?

This comment has been minimized.

Copy link
@crisbeto

crisbeto Sep 14, 2019

Author Member

I was a bit on the fence about this one, but I decided to do it so it's consistent and in case something that isn't used in dev mode gets added in the future. I'll leave to the reviewer to weigh in on it.

@ngbot ngbot bot modified the milestone: needsTriage Sep 14, 2019
@crisbeto crisbeto marked this pull request as ready for review Sep 14, 2019
@crisbeto crisbeto requested review from angular/fw-core as code owners Sep 14, 2019
Copy link
Member

left a comment

LGTM, thnx!

@kara
kara approved these changes Sep 16, 2019
Copy link
Contributor

left a comment

LGTM

@kara

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2019

@kara kara closed this in e6ed4a2 Sep 16, 2019
arnehoek added a commit to arnehoek/angular that referenced this pull request Sep 26, 2019
…#32681)

Currently all property instructions eventually call into `elementPropertyInternal` which in turn calls to `getLView`, however all of the instructions already have access to the LView. These changes switch to passing in the LView as a parameter.

PR Close angular#32681
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.