Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CPU profiler from legacy trace viewer #5539

Merged
merged 4 commits into from
Mar 28, 2023

Conversation

kenzieschmoll
Copy link
Member

The legacy trace viewer pulls a CPU profile when an event from the UI thread is selected. This profile would be shown at the bottom. The profiler has minimal samples for an event like this and doesn't allow for showing samples that spanned multiple events / flutter frames.

The legacy trace viewer is off by default (replaced with perfetto) and only accessible by enabling the setting 'Use legacy trace viewer'. At some point, we will likely remove the legacy trace viewer entirely (#5466), but for now, this PR removes the profiler from the legacy view to reduce the maintenance burden and to simplify where we need to do things like set the cpu sampling rate in initialization. When we switch to the protozero format, the perfetto view will have cpu samples included in the data (#4755).

This will also reduce the cost of having a higher sampling rate by default when a user opens the performance page. We will now only increase the sampling rate when a user opens the CPU profiler page. In the future, once the perfetto view supports showing CPU samples in the timeline, we will add a setting to the Performance page that allows a user to increase the CPU sampling rate if they choose to, but not by default. CC @dnfield - addresses part of your concerns.

@kenzieschmoll kenzieschmoll requested a review from a team as a code owner March 28, 2023 17:37
@kenzieschmoll kenzieschmoll requested review from CoderDake and removed request for a team March 28, 2023 17:37
@kenzieschmoll kenzieschmoll merged commit 7a80758 into flutter:master Mar 28, 2023
@kenzieschmoll kenzieschmoll deleted the legacy-cpu branch March 28, 2023 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants