Consider alternative algorithm for selecting node after auto-refreshing the inspector tree
- Dominant language
- Dart
- Stars
- 1.7k
- Forks
- 404
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 18
Description
Currently we walk up the tree from the previously selected node until we find the first unchanged ancestor. Then, we walk down the new tree from that ancestor until we find the first node matching the description of the previously selected node, or if we can't find any nodes matching the description, we select the first unchanged ancestor.
Instead, we could keep track of the path (as a linked list) from the previously selected node to the first unchanged ancestor, then use a variation of a path finding algorithm to walk down the path, including searching down paths where a node might have changed or been renamed. Note that this would be slightly less performant than the current approach.
Marking this as P3, can bump the priority if we decide this is a necessary improvement.
Contributor guide
Assessment
This issue has not been assessed yet.