flutter / flutter/devtools

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

Đang mở
#8,481 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
inspector-2.0-polish P3 screen: inspector
Ngôn ngữ chính
Dart
Star
1.7k
Fork
404
Merge trung bình
6 ngày 17 giờ
Pull request đã merge (30 ngày)
18

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start by tracing the inspector tree's auto-refresh selection logic and documenting how it currently walks to an unchanged ancestor and searches for a matching node. Compare that behavior with the proposed linked-list path search, including renamed or changed nodes; done means the selection behavior and performance trade-off are understood well enough to choose an approach.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
dart
Lĩnh vực
devtools
Loại issue
Tái cấu trúc
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.