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 generating selectors array for directives without a selector #33431
Conversation
…selector Now that we've replaced `ngBaseDef` with an abstract directive definition, there are a lot more cases where we generate a directive definition without a selector. These changes make it so that we don't generate the `selectors` array if it's going to be empty.
59234f7
to
c806bf4
Compare
function getStylingPrefix(name: string): string { | ||
return name.substring(0, 5); // style or class | ||
} | ||
|
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.
Was this just dead-code?
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.
Yes, it's been there for a while so I decided to clean it up.
@crisbeto FYI, VE and Ivy presubmits are successful for this PR. Feel free to add "merge" label if it's ready to be merged. Thank you. |
…selector (angular#33431) Now that we've replaced `ngBaseDef` with an abstract directive definition, there are a lot more cases where we generate a directive definition without a selector. These changes make it so that we don't generate the `selectors` array if it's going to be empty. PR Close angular#33431
…selector (angular#33431) Now that we've replaced `ngBaseDef` with an abstract directive definition, there are a lot more cases where we generate a directive definition without a selector. These changes make it so that we don't generate the `selectors` array if it's going to be empty. PR Close angular#33431
…selector (angular#33431) Now that we've replaced `ngBaseDef` with an abstract directive definition, there are a lot more cases where we generate a directive definition without a selector. These changes make it so that we don't generate the `selectors` array if it's going to be empty. PR Close angular#33431
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. |
Now that we've replaced
ngBaseDef
with an abstract directive definition, there are a lot more cases where we generate a directive definition without a selector. These changes make it so that we don't generate theselectors
array if it's going to be empty.