X Tutup
Skip to content

perf(core): detect existing signal dependency without checking all pr…#67506

Open
JoostK wants to merge 1 commit intoangular:mainfrom
JoostK:signals/link-insertion-perf
Open

perf(core): detect existing signal dependency without checking all pr…#67506
JoostK wants to merge 1 commit intoangular:mainfrom
JoostK:signals/link-insertion-perf

Conversation

@JoostK
Copy link
Member

@JoostK JoostK commented Mar 7, 2026

…oducer links

This commit addresses a scaling issue in the signal dependency graph where the detection of duplicate dependency links would perform a linear scan across all consumer links of all producers. The linear scan is replaced with a version comparison of the dependency edge against the version of the node; if they are equal the existing dependency edge is valid.

Closes #67454

@JoostK JoostK added the target: patch This PR is targeted for the next patch release label Mar 7, 2026
@pullapprove pullapprove bot requested review from AndrewKushnir and ENAML March 7, 2026 15:37
@angular-robot angular-robot bot added area: performance Issues related to performance area: core Issues related to the framework runtime requires: TGP This PR requires a passing TGP before merging is allowed labels Mar 7, 2026
@ngbot ngbot bot added this to the Backlog milestone Mar 7, 2026
@AndrewKushnir AndrewKushnir requested review from alxhub and pkozlowski-opensource and removed request for AndrewKushnir March 7, 2026 16:06
@JoostK JoostK 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 Mar 7, 2026
@JoostK JoostK marked this pull request as draft March 7, 2026 17:13
@JoostK JoostK force-pushed the signals/link-insertion-perf branch from d1029a1 to ac1c95b Compare March 7, 2026 22:05
@JoostK JoostK marked this pull request as ready for review March 7, 2026 22:06
@JoostK JoostK 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 Mar 7, 2026
…oducer links

This commit addresses a scaling issue in the signal dependency graph where
the detection of duplicate dependency links would perform a linear scan across
all consumer links of all producers. The linear scan is replaced with a version
comparison of the dependency edge against the current epoch; if they are
equal the existing dependency edge is known to be valid in this epoch. This means
that the link won't be eligible for removal and therefore doesn't have to be
recreated.

Closes angular#67454
@JoostK JoostK force-pushed the signals/link-insertion-perf branch from ac1c95b to bb41616 Compare March 7, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Issues related to the framework runtime area: performance Issues related to performance requires: TGP This PR requires a passing TGP before merging is allowed target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PR #62284 (commit 3c008c9) introduced an O(N²) performance regression for computed signals that depend on many producers.

2 participants

X Tutup