flutter / flutter/devtools

Refactor `cpu_profile_model` to prevent side effects

Đang mở
#9,353 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
P3 screen: cpu profiler
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ả

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.

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

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

Đánh giá

Issue này chưa được đánh giá.

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.