Show debug-mode message for widget rebuilds in profile mode#9755
Show debug-mode message for widget rebuilds in profile mode#9755crackedhandle wants to merge 14 commits intoflutter:masterfrom
Conversation
When running in profile mode, the Performance panel showed a disabled 'Count widget builds' checkbox which was misleading. Widget rebuild counts rely on debugOnRebuildDirtyWidget which is only available in debug mode. This change: - Removes the checkbox when running in profile mode - Shows a clear message: 'Rebuild information is not available for this frame. Widget rebuild counts are only available when running an app in debug-mode.' - Adds widget tests for both profile mode and debug mode behavior Fixes flutter#9730
|
@elliette can you review this? |
| selectedFrame = ValueNotifier<FlutterFrame?>(null); | ||
| }); | ||
|
|
||
| testWidgets( |
There was a problem hiding this comment.
Could we add these tests cases to the performance_screen_test instead of creating a new test suite? Thanks!
There was a problem hiding this comment.
Please review the required changes @elliette ! thanks
Per reviewer feedback, moved the profile mode widget tests from a separate test file into the existing performance_screen_test.dart. Also added required imports for RebuildStatsView, RebuildCountModel, FlutterFrame and foundation.
Updated the release notes for DevTools 2.58.0 with a new link format.
| ## Performance updates | ||
|
|
||
| TODO: Remove this section if there are not any updates. | ||
| - Show a message in the Performance panel when widget rebuild tracking is |
There was a problem hiding this comment.
Release notes should be in past tense (e.g. "Added a message...")
There was a problem hiding this comment.
Added the missing period and updated the release note to past tense. Thanks for the review. I really appreciate the attention to detail and I’m learning a lot from this process. Please let me know if any further changes are needed.
Updated release notes for version 2.58.0 to reflect changes in the Performance panel and formatting corrections.
|
I see CI is failing due to lint warnings in DevTools files that I haven’t modified. Should I address these as part of this PR, or is there a preferred way to handle them? @srawlins |
|
I think those are the result of a new version of analyzer... or Dart... or even DCM I guess. So we just have to fix them out-of-band. Probably someone should fix them and land that fix before landing other PRs. |
Got it, thanks for the clarification. I’ll wait for the lint fixes to land and re-run CI afterward. |
Fixes #9730
Problem
When running in profile mode, the Performance panel showed a
disabled "Count widget builds" checkbox which was misleading -
it implies the feature could work if enabled. In reality, widget
rebuild counts rely on
debugOnRebuildDirtyWidgetwhich is onlyavailable in debug mode.
Solution
Tests
Added
rebuild_stats_view_test.dartwith two widget tests: