Skip to content

Hoist paint_pictures composition state and guard ViewerEnd wire lookups in Android bundle check - #2325

Merged
trissim merged 1 commit into
mainfrom
perf/qt-paint-pictures-hot-path
Nov 27, 2026
Merged

trissim merged 1 commit into
mainfrom
perf/qt-paint-pictures-hot-path

Conversation

@trissim

@trissim trissim commented Nov 27, 2026

Copy link
Copy Markdown

Changes

  1. Android bundle check (tools/android/bundle_check.py:229-236): exercise FailedTurnEvidence.recorded_member, WakeAssignment.recorded_member, and TeammateState.recorded_member alongside HarnessSession inside the isolated -S -B shipped-app check so any ViewerEnd.receives wire lookup that drifts into packaging fails at APK build time.
  2. Qt paint_pictures hot-path (src/toad/qt/history.py, src/toad/qt/virtual_scroll.py):
    • Hoist CompositionMode_Source once per settled paint pass in begin_paint(..., animating=False) instead of calling painter.save() / setCompositionMode() / restore() per row (direct document fallback switches back to SourceOver inside its existing save()/restore()).
    • Skip per-tile QRect + QRegion.intersects when the clip is a single rect (effective_clip.rectCount() == 1).
    • Pass (draw_x, draw_y, picture) directly to painter.drawImage (no per-tile QPoint allocation) and hoist invariant rect/tile locals outside the tile loop.

Proof

  • pytest tests/model/test_android_perf_ux_arrivals.py: 34 passed in 0.79s.
  • qt_inherit_ratchet.py 0/0/0/0/0, shadow_check.py 0, guarded_imports.py 0, TOAD_REL_IMPORTS=0.

@trissim
trissim merged commit 91e83e9 into main Nov 27, 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