Consider alternative algorithm for selecting node after auto-refreshing the inspector tree #8481
Labels
inspector-2.0-polish
Polish work that can be tackled once Inspector 2.0 has landed.
P3
issues we think are valid but not important
screen: inspector
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.
The text was updated successfully, but these errors were encountered: