perf(sports): drop get_cycle_duration's diagnostics to debug level - #309
perf(sports): drop get_cycle_duration's diagnostics to debug level#309ChuckBuilds wants to merge 1 commit into
Conversation
get_cycle_duration() opens with an unconditional INFO line naming its arguments, and five sports plugins carry between eight and twelve more through the body -- "returning None", "extracted mode_type=", and so on. All of it is diagnostic: it describes the function's own control flow, not anything that happened to the display. The core calls this from the main display loop. In display_controller.run(), once a plugin has rendered content, the else branch reads the base duration and then, if dynamic duration is enabled for the mode, queries the plugin for its cycle duration. That loop is paced at frame rate, so every one of those INFO lines lands at frame rate for as long as the mode is on screen. It is gated behind dynamic_duration being enabled, which is why it is not visible on the rig I can measure -- that config has the feature off, and the journal shows zero such lines in six hours. It is not an obscure setting though; football ships DYNAMIC_DURATION.md telling users how to turn it on. Same shape as the has_live_content flood fixed in #241: a per-frame caller meeting logging written as if it ran once. Demoted rather than throttled, because unlike the live-content summary none of this is worth an operator's attention even once -- it is what you turn debug on to see. 48 lines across five plugins. No behaviour change. Safety harness: 104 pass, 0 fail across all five. Versions land above the ones in #308 so the two merge in ascending order. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STMbQE4YctTacQXfbYqKuW
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 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. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
Correction to the merge-order note in the description: I wrote that these "merge cleanly in ascending version order". They do not merge cleanly. I test-merged them and they conflict. Ascending order decides the correct resolution; it does not avoid the conflict. Both PRs edit the same What I verified, merging #308 then #309 onto main: The code composes cleanly. Only version bookkeeping collides, and Resolution, which I ran through end to end:
The result carries both changes: the throttle fix's So the ordering advice stands — #308 first, then this — but expect to resolve the version lines rather than fast-forward through them. |
|
Superseded by #315, which combines this with the other five sports PRs so each plugin gets one version bump instead of up to four competing ones. Every change from this PR is verified present on that branch; the branch here is untouched if you want to compare. |
get_cycle_duration()opens with an unconditional INFO line naming its own arguments, and five sports plugins carry 8–12 more through the body:All of it describes the function's own control flow, not anything that happened to the display.
Why the level matters here
The core calls this from the main display loop. In
display_controller.run():That loop is paced at frame rate, so each of these INFO lines lands at frame rate for as long as the mode is on screen — and every line is a journal write to an SD card.
Honest scoping
I could not measure this firing, and I want to be clear about that. It is gated behind
dynamic_durationbeing enabled; the rig I have access to has that unset, and its journal shows zero such lines in six hours. So this is a latent flood, not one I caught in the act.It is not an obscure setting though — football ships
DYNAMIC_DURATION.mdexplaining how to turn it on, so users are actively encouraged into the path.Why demote rather than throttle
Same shape as the
has_live_contentflood fixed in #241 — a per-frame caller meeting logging written as if it ran once. But unlike the live-content summary, none of this is worth an operator's attention even once. It is what you turn debug on to see, sodebugis where it belongs. No throttle state to maintain.Verification
48 lines demoted across five plugins, zero
logger.inforemaining in those functions, no behaviour change. Safety harness: 104 pass, 0 fail.Merge order
Versions land above the ones in #308 (which touches three of the same plugins), so the two merge cleanly in ascending version order: #308 first, then this.