Commit d28300b
authored
fix(core): prevent exponential traversal in _dialogClosed and _onRootViewReset (#11220)
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).1 parent a051213 commit d28300b
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1502 | 1502 | | |
1503 | 1503 | | |
1504 | 1504 | | |
1505 | | - | |
| 1505 | + | |
1506 | 1506 | | |
1507 | 1507 | | |
1508 | 1508 | | |
| |||
1513 | 1513 | | |
1514 | 1514 | | |
1515 | 1515 | | |
1516 | | - | |
| 1516 | + | |
1517 | 1517 | | |
1518 | 1518 | | |
1519 | 1519 | | |
| |||
0 commit comments