Consider alternative algorithm for selecting node after auto-refreshing the inspector tree
- 主要语言
- Dart
- 星标
- 1.7k
- 派生
- 404
- 平均合并
- 6 天 17 小时
- 30 天内合并 PR
- 18
描述
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.
贡献指南
调研方向
首先跟踪 inspector tree 的 auto-refresh 选择逻辑,并记录它当前如何向上遍历到未更改的祖先节点,然后搜索匹配的节点。将该行为与提议的链表路径搜索进行比较,包括重命名或发生更改的节点;当对选择行为和性能权衡的理解足以据此选择一种方案时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- dart
- 领域
- devtools
- Issue 类型
- 重构
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100