Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider alternative algorithm for selecting node after auto-refreshing the inspector tree #8481

Open
elliette opened this issue Oct 25, 2024 · 0 comments
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

Comments

@elliette
Copy link
Member

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.

@elliette elliette added screen: inspector P3 issues we think are valid but not important inspector-2.0-polish Polish work that can be tackled once Inspector 2.0 has landed. labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant