Skip to content

Conversation

@JoostK
Copy link
Member

@JoostK JoostK commented Aug 11, 2024

A prior fix in #57291 has introduced the potential for false negatives, as the used directives
that were checked can be present anywhere in the template, not necessarily on the current element
that is being checked. Fixing this requires reshuffling the check's logic a bit, as the extended
diagnostics infrastructure does not provide access to ancestor nodes, nor do the AST nodes
themselves.

The performance regression that was fixed in #57291 doesn't reappear with this change, although
it may affect performance slightly as potentially more bindings may end up being checked.

JoostK added 2 commits August 11, 2024 22:30
…voked` extended diagnostic

A prior fix in angular#57291 has introduced the potential for false negatives, as the used directives
that were checked can be present anywhere in the template, not necessarily on the current element
that is being checked. Fixing this requires reshuffling the check's logic a bit, as the extended
diagnostics infrastructure does not provide access to ancestor nodes, nor do the AST nodes
themselves.

The performance regression that was fixed in angular#57291 doesn't reappear with this change, although
it may affect performance slightly as potentially more bindings may end up being checked.
…levant

Symbol lookups are somewhat expensive and this instance is easily avoided, as it is expected that
many property reads will not be one of the relevant properties.
@JoostK JoostK added target: patch This PR is targeted for the next patch release area: compiler Issues related to `ngc`, Angular's template compiler compiler: extended diagnostics labels Aug 11, 2024
@ngbot ngbot bot modified the milestone: Backlog Aug 11, 2024
@JoostK JoostK added the action: review The PR is still awaiting reviews from at least one requested reviewer label Aug 12, 2024
@thePunderWoman thePunderWoman marked this pull request as draft May 21, 2025 15:28
JoostK added a commit to JoostK/angular that referenced this pull request Oct 14, 2025
…ed" check

This fixes a performance regression from angular#63754, which is almost a revert of the
prior performance fix in angular#57291; the latter was provided as quick fix to address
the severe performance overhead this extended diagnostic used to have, with angular#57337
as follow-up change to address the false negatives that were introduced in angular#57291.
That follow-up never landed, though, so this commit is re-applying the changes
from angular#57337 to fix the performance regression.

Fixes angular#64403
@JoostK
Copy link
Member Author

JoostK commented Oct 14, 2025

Superseded by #64410

@JoostK JoostK closed this Oct 14, 2025
AndrewKushnir pushed a commit that referenced this pull request Oct 14, 2025
…ed" check (#64410)

This fixes a performance regression from #63754, which is almost a revert of the
prior performance fix in #57291; the latter was provided as quick fix to address
the severe performance overhead this extended diagnostic used to have, with #57337
as follow-up change to address the false negatives that were introduced in #57291.
That follow-up never landed, though, so this commit is re-applying the changes
from #57337 to fix the performance regression.

Fixes #64403

PR Close #64410
AndrewKushnir pushed a commit that referenced this pull request Oct 14, 2025
…ed" check (#64410)

This fixes a performance regression from #63754, which is almost a revert of the
prior performance fix in #57291; the latter was provided as quick fix to address
the severe performance overhead this extended diagnostic used to have, with #57337
as follow-up change to address the false negatives that were introduced in #57291.
That follow-up never landed, though, so this commit is re-applying the changes
from #57337 to fix the performance regression.

Fixes #64403

PR Close #64410
@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 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer area: compiler Issues related to `ngc`, Angular's template compiler compiler: extended diagnostics target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant