Skip to content

fix(core): prevent exponential traversal in _dialogClosed and _onRootViewReset#11220

Merged
NathanWalker merged 1 commit into
mainfrom
fix/o2n-dialog
May 19, 2026
Merged

fix(core): prevent exponential traversal in _dialogClosed and _onRootViewReset#11220
NathanWalker merged 1 commit into
mainfrom
fix/o2n-dialog

Conversation

@edusperoni
Copy link
Copy Markdown
Contributor

PR Checklist

What is the current behavior?

Both methods used eachDescendant to walk the full subtree, then each visited child recursively called the same method—which walked its own subtree again. For a tree of depth n this produced O(2^n) visits.

What is the new behavior?

Replace eachDescendant with eachChild so each node is visited exactly once via natural recursion, reducing traversal to O(n).

…ViewReset

Both methods used eachDescendant to walk the full subtree, then each
visited child recursively called the same method—which walked its own
subtree again. For a tree of depth n this produced O(2^n) visits.

Replace eachDescendant with eachChild so each node is visited exactly
once via natural recursion, reducing traversal to O(n).
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 19, 2026

View your CI Pipeline Execution ↗ for commit d7a49a4

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 3m 49s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-19 13:31:23 UTC

@NathanWalker NathanWalker merged commit d28300b into main May 19, 2026
7 checks passed
@NathanWalker NathanWalker deleted the fix/o2n-dialog branch May 19, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants