Adriano Machado created CAMEL-24007:
---------------------------------------
Summary: camel-jbang TUI: skip redundant full-screen re-render on
idle ticks
Key: CAMEL-24007
URL: https://issues.apache.org/jira/browse/CAMEL-24007
Project: Camel
Issue Type: Improvement
Reporter: Adriano Machado
The Camel TUI \({{camel\-jbang\-plugin\-tui}}\) rebuilds and diffs the entire
widget tree on every tick event. At the framework's default tick rate of 40ms
this is \~25 redraws per second, even when the UI is idle and nothing has
changed.
Root cause: {{CamelMonitor.handleTickEvent}} unconditionally returns {{true}},
and the underlying TamboUI {{TuiRunner}} redraws whenever the event handler
returns {{true}}. Application data only changes every {{refreshInterval}}
\(default 500ms\), so roughly 24 of every 25 renders produce identical frames.
There is no visual flicker \(the framework double\-buffers and diffs\), but it
wastes CPU on every idle frame.
Proposed fix: return {{true}} from the tick handler only when the periodic data
refresh fired or an animation is in flight \(open shell/AI panel, sliding
pinned\-log panel, canvas animation, typing/fading caption, header notification
wave, or the recorded\-keystroke highlight\). All other time\-based UI elements
are healed by the periodic data\-refresh redraw within 500ms.
_Reported by Claude Code on behalf of ammachado._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)