Skip to content

virtual rows: an arrival lays the view out only when a drawn row changes height - #69

Merged
trissim merged 1 commit into
mainfrom
landed-look-repaints
Nov 20, 2026
Merged

trissim merged 1 commit into
mainfrom
landed-look-repaints

Conversation

@trissim

@trissim trissim commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Every formatting arrival laid every row out. In a Toad history, scrolling ten pages back (233 rows) ran 97 whole layouts: 422 arrivals were rows prepared before they were drawn, and 109 were new looks of a row at the height it had.

_moves_rows decides per arrival whether a drawn row changes height; a batch that moved none repaints. Measured with Toad's qt_drive history_scroll_back: 97 full layouts before, 6 after.

Tests: test_virtual_rows.py 7 pass (1 new).

🤖 Generated with Claude Code

https://claude.ai/code/session_01XbFMSmfWxP4Wnm2cFnvSCk

…ges height

Every formatting arrival laid every row out in the next frame. Scrolling ten pages back in
a Toad history (233 rows) ran 97 whole layouts: 422 arrivals were rows a member prepared
before drawing them (adopt), which no drawn row was waiting for, and 109 were new looks of a
drawn row at the height it had (a sent message's receipt).

RowDocumentDelegate._moves_rows decides per arrival: a row measured under the key that is
as tall from what arrived keeps its size; one that differs, or stood at an estimate, or was
waiting with only its plain text, is laid out; formatting nothing waited for moves nothing.
A batch that moved no row repaints (rows_repainted) instead of laying out (rows_changed).
RowSize keeps its own copy of the font it was measured with, to measure the arrival.

Measured with Toad's qt_drive history_scroll_back (10 pages, 233 rows): 97 full layouts
before, 6 after.

Tests: test_virtual_rows.py 7 pass (1 new: same height repaints; taller lays out; unawaited
moves nothing; awaited lays out). test_virtual_rows_band.py's two tests time out on main too
in this offscreen environment.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbFMSmfWxP4Wnm2cFnvSCk
@trissim
trissim merged commit fdc7f2a into main Nov 20, 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