Directive instance refactor by pkozlowski-opensource · Pull Request #33322 · angular/angular · GitHub
Skip to content

Directive instance refactor - #33322

Closed
pkozlowski-opensource wants to merge 5 commits into
angular:masterfrom
pkozlowski-opensource:directive_instance_refactor
Closed

pkozlowski-opensource wants to merge 5 commits into
angular:masterfrom
pkozlowski-opensource:directive_instance_refactor

Conversation

@pkozlowski-opensource

Copy link
Copy Markdown
Member

No description provided.

@ngbot ngbot Bot added this to the needsTriage milestone Oct 22, 2019
@pkozlowski-opensource pkozlowski-opensource added target: major This PR is targeted for the next major release action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 22, 2019
@pkozlowski-opensource
pkozlowski-opensource force-pushed the directive_instance_refactor branch from 202478b to 6d5e0b8 Compare October 22, 2019 15:25
@pkozlowski-opensource

Copy link
Copy Markdown
Member Author

@pkozlowski-opensource
pkozlowski-opensource marked this pull request as ready for review October 22, 2019 15:41
@pkozlowski-opensource
pkozlowski-opensource requested a review from a team October 22, 2019 15:41
Before this change instantiating multiple directives on the same
host node would result in repeated RNode retrieval and patching.
This commint re-organises code around directive instance creation
so the host node processing (common to all directives) happens
once and only once.

As the additional benefit the directive instantiation logic gets
centralised in one function (at the expense of patching logic
duplication for root node).
@pkozlowski-opensource
pkozlowski-opensource force-pushed the directive_instance_refactor branch from 6d5e0b8 to 09e96cd Compare October 30, 2019 08:55
@pkozlowski-opensource
pkozlowski-opensource force-pushed the directive_instance_refactor branch from 09e96cd to bc73ebe Compare October 30, 2019 13:56

@kara kara left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread packages/core/src/render3/interfaces/node.ts Outdated
Comment thread packages/core/src/render3/instructions/shared.ts
@kara kara 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 Oct 30, 2019
Co-Authored-By: Kara <kara@users.noreply.github.com>
@pkozlowski-opensource pkozlowski-opensource 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 Oct 31, 2019
@kara kara added the action: presubmit The PR is in need of a google3 presubmit label Oct 31, 2019
@kara

kara commented Oct 31, 2019

Copy link
Copy Markdown
Contributor

VE presubmit

Ivy presubmit

@AndrewKushnir AndrewKushnir added target: patch This PR is targeted for the next patch release and removed target: major This PR is targeted for the next major release labels Oct 31, 2019
@atscott atscott removed the action: presubmit The PR is in need of a google3 presubmit label Oct 31, 2019
atscott pushed a commit that referenced this pull request Oct 31, 2019
atscott pushed a commit that referenced this pull request Oct 31, 2019
Before this change instantiating multiple directives on the same
host node would result in repeated RNode retrieval and patching.
This commint re-organises code around directive instance creation
so the host node processing (common to all directives) happens
once and only once.

As the additional benefit the directive instantiation logic gets
centralised in one function (at the expense of patching logic
duplication for root node).

PR Close #33322
atscott pushed a commit that referenced this pull request Oct 31, 2019
@atscott atscott closed this in 3ff712a Oct 31, 2019
atscott pushed a commit that referenced this pull request Oct 31, 2019
atscott pushed a commit that referenced this pull request Oct 31, 2019
Before this change instantiating multiple directives on the same
host node would result in repeated RNode retrieval and patching.
This commint re-organises code around directive instance creation
so the host node processing (common to all directives) happens
once and only once.

As the additional benefit the directive instantiation logic gets
centralised in one function (at the expense of patching logic
duplication for root node).

PR Close #33322
atscott pushed a commit that referenced this pull request Oct 31, 2019
@angular-automatic-lock-bot

Copy link
Copy Markdown

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Dec 1, 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 cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants