-
Notifications
You must be signed in to change notification settings - Fork 313
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
Add Track Paints and Track Layouts toggles to the performance page. #3451
Add Track Paints and Track Layouts toggles to the performance page. #3451
Conversation
This sounds reasonable, since those icons have pretty standard meanings.
How about a dropdown with check boxes? Question: do these "Track XYZ" buttons work in both profile and debug modes or just debug mode? And how costly to turn on each? We might want to consider turning on some of those options by default in debug mode and proactively process the data to surface things worth the user's attention. |
Both debug and profile.
To my knowledge, we don't have any measurements on this. There is a cost, though I'm not sure how high. In general, I would expect that the more timeline events that are added, the higher the cost. So if a lot of widgets are built / painted / laid out for a frame, the higher the cost would be for these debugging toggles to be on. @goderbauer do you know if we have any measurements anywhere for the cost of enabling these debug flags? Or have you noticed a big discrepancy in performance with and without some of these flags enabled? In general, I think these features should be used to enhance the trace, but are expected to skew measurements a bit. |
I'd love to see some sample data from "Track Paints" and "Track Layouts. Is there a way to generate some today?
I'm interested in experimenting perf metrics other than time to render each frame in the debug mode. The data coming out of these three tracing options could be really useful to understand how much work of each type the system is doing. We can talk more in our Monday critique meeting. |
I am not aware of the exact numbers, but enabling these noticeable slows down things. That's why we have them off by default. The idea is you'd only turn on e.g. "track layout" when you see that the layout is taking too long. The flag then allows you to dive deeper into it (but you no longer get accurate absolute performance numbers, you just see what's slower relative to other operations).
100% agree
You can manually set these to true before running your app and the additional traces will appear in the timeline: |
Here is the updated UI after the last commit All buttons: CC @johnpryan we'll want to document these perf debugging features and link to the docs from here. |
Filed #3460 to track an idea for how to nudge users to enable these advanced tracing uptions. |
packages/devtools_app/lib/src/performance/performance_screen.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/performance/performance_screen.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/performance/performance_screen.dart
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO Adding these toggles crowds the button. Here a couple ideas:
Thoughts? @cobblest @InMatrix @ayanogawa
When these new options are enabled, timeline events are added to for RenderObject paints and layouts respectively.
CC @goderbauer
Depends on flutter/flutter#91822.