Repository navigation
name wave: a frame repaints a line only when its band moved to other cells - #2126
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Measured
qt_drive idlefollows the laptop's bus, about 30 working threads in the sidebar, with nothing on screen changing. Median CPU of the Qt process:Following a busy bus costs the UI about 1%. The rest is the 20 fps
NAME_WAVEon 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 newQTextLayout.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
ViewLabelis unchanged. Itsrepaintalso carries text fades, so it can't skip a frame on the wave's account alone.Gates (on fbe95d8)
check.shwith PYTHONFAULTHANDLER=1: exit 0, no fatal or traceback lines. The realtoad.jsonwas untouched.🤖 Generated with Claude Code
https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3