flutter / flutter/devtools

Refactor `cpu_profile_model` to prevent side effects

Offen
#9,353 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
P3 screen: cpu profiler
Vorherrschende Sprache
Dart
Sterne
1.7k
Forks
404
Ø Merge
6 T. 17 Std.
Gemergte PRs (30 T.)
18

Beschreibung

The functions called in `generateFromCpuSamples` must be called in that particular order. This is because of function side effects:

1. Generating the stack frames both creates the timeline tree and assigns frame IDs to every node in the tree
2. Creating the sample events expects that the tree has already been created, and that the frame IDs have been assigned to every node

Ideally we should refactor the code so that we aren't dependent on hidden side effects.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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