flutter / flutter/devtools

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

Offen
#8,481 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
inspector-2.0-polish P3 screen: inspector
Vorherrschende Sprache
Dart
Sterne
1.7k
Forks
404
Ø Merge
6 T. 17 Std.
Gemergte PRs (30 T.)
18

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
dart
Bereich
devtools
Issue-Typ
Refactoring
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.