Repository navigation
Conversation
The 12 ms budget is 72% of a 60 Hz frame and 144% of a 120 Hz frame, so a walk that used it could not fit before the next vsync. While a frame is already due (an animation is running) the publisher now gives a walk 35% of one frame at the display's refresh rate, never less than 2 ms and never more than the limit's own budget: 5.8 ms at 60 Hz, 2.9 ms at 120 Hz. With nothing due, and for an explicit captureViewHierarchy, the full 12 ms still applies. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WeiJxNbNUdWru1zs68bYV8 Change-Id: Ia20c376f2808e62752f0f97063ee35462b37e478
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Claude finished @krassx's task in 3m 7s —— View job Review of PR #29: walk budget follows the frameI read the full diff against Findings: one inline P3 on Checked and found correct
Non-blocking note: Summary
|
…s quiet A review pointed out that on a screen that animates for good every walk is taken with a frame due and so gets the smaller budget; on a slow device that makes the snapshot truncated, at a device-dependent place. That is the intended price of keeping the UI thread first; say so, and name the knob. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WeiJxNbNUdWru1zs68bYV8 Change-Id: I786729bd7aaee87549484a30e174a151a61d29a4
…erarchy-frame-budget Change-Id: I53f0db8822ab44f699a3e0eba6f68c2ed203aed6 # Conflicts: # doc/design-rules.md # test/view_hierarchy_publisher_test.dart
|
Claude finished @krassx's task in 25s —— View job Re-review of PR #29 (push to
|
…busy' into perf/view-hierarchy-frame-budget Change-Id: Ide5523d4ee3a655c968c7bf0a652c8346f176900
|
Claude finished @krassx's task in 21s —— View job Re-review of PR #29 (push to
|
…erarchy-frame-budget Change-Id: Id7de62c6f68dba9413e708d329b2762d605642e8
|
Claude finished @krassx's task in 17s —— View job Re-review of PR #29 (push to
|
Stacked on #27.
The 12 ms budget is 72% of a 60 Hz frame (16.7 ms) and 144% of a 120 Hz frame (8.3 ms), so a walk that used it could not fit before the next vsync. While a frame is already due (
SchedulerBinding.hasScheduledFrame, i.e. an animation is running) the publisher now gives a walk 35% of one frame at the display's refresh rate (Display.refreshRate, 60 Hz if unknown), never less than 2 ms and never more than the limit's own 12 ms: 5.8 ms at 60 Hz, 2.9 ms at 120 Hz. With nothing due, and for an explicitcaptureViewHierarchy, the full 12 ms applies.Trade-off, not measured on devices: a walk cut by the smaller budget is marked
truncatedlike any other. On the Android phone a normal list screen walks in ~10 ms, so the walk taken every 3 s on an endlessly animating screen (and any walk with a frame due) is truncated there. Nothing is lost on a screen that settles, because the walk then runs with no frame due and the full budget. If truncated snapshots on animating screens matter more than the jank, the share (frameShare, 0.35) is a constructor parameter.Tests: budget with nothing due; 60 Hz, 120 Hz, a very fast display (2 ms floor), a slow display (never over the limit); an explicit capture keeps 12 ms. The 12 ms default itself is still pinned by the existing test.
Checks:
flutter analyze, fullflutter test.🤖 Generated with Claude Code