Skip to content

name wave: a frame repaints a line only when its band moved to other cells - #2126

Merged
trissim merged 1 commit into
mainfrom
qt-wave-unmoved
Nov 18, 2026
Merged

trissim merged 1 commit into
mainfrom
qt-wave-unmoved

Conversation

@trissim

@trissim trissim commented Nov 18, 2026

Copy link
Copy Markdown

Measured

qt_drive idle follows the laptop's bus, about 30 working threads in the sidebar, with nothing on screen changing. Median CPU of the Qt process:

before this PR animations off
home sidebar 6.4–7.0% 5.0% 1.1%
#comms open 5.6–6.7% 4.8% 0.9%

Following a busy bus costs the UI about 1%. The rest is the 20 fps NAME_WAVE on working rows: about 600 row repaints a second, and about 40% of them left the band on the same cells and redrew the same pixels, each building a new QTextLayout.

Change

NameWave.wave_moved(span), in the shared parent, decides once whether a frame's band covers different cells than the line last drew. A wave that starts or stops forgets its last span, so its first frame (the name turning bold) still draws. Qt's sidebar rows ask it before invalidating their rect.

Textual's ViewLabel is unchanged. Its repaint also carries text fades, so it can't skip a frame on the wave's account alone.

Gates (on fbe95d8)

  • Ratchet: 11/11, 0, bare 21/21, parallel copies 0. shadow_check: 0.
  • Live-bus drives (arrival, history, participants, composer, tabs, frame): all exit 0.
  • check.sh with PYTHONFAULTHANDLER=1: exit 0, no fatal or traceback lines. The real toad.json was untouched.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3

…cells

The band is drawn in whole cells, so a frame that leaves it on the same cells paints the
same line. On a busy bus (the laptop's: about 30 working threads in the sidebar) 40% of
the ~600 sidebar row repaints a second were such frames, each building a new QTextLayout.
`NameWave.wave_moved` decides it once for every frontend from the span a line drew last;
a wave that starts or stops forgets it, so its first frame (the name turning bold) draws.
Qt's sidebar rows ask it before invalidating their rect.

Measured with `qt_drive idle` against the laptop's bus, untouched, median CPU:
home 6.4-7.0% -> 5.0%, #comms 5.6-6.7% -> 4.8% (animations off: 1.1% / 0.9%).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
@trissim
trissim merged commit e3f4e67 into main Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant