Skip to content

Avoid extra cached_band_inks call on warm hit in QtNameWaveDelegate.text_inks - #2324

Merged
trissim merged 1 commit into
mainfrom
fix/name-wave-text-inks-hot-hit
Nov 27, 2026
Merged

trissim merged 1 commit into
mainfrom
fix/name-wave-text-inks-hot-hit

Conversation

@trissim

@trissim trissim commented Nov 27, 2026

Copy link
Copy Markdown

Why

shipped_run.py's frame_work gate caught list_item_delegate.MultilinePreviewItemDelegate.paint ticking from 68.5 to 74.6 Python calls/frame (69.3 allowed) after #2322, because QtNameWaveDelegate.text_inks() delegated every warm cache hit through self.cached_band_inks(...) (+1 Python call per painted waving row).

What changed

  • src/toad/qt/name_wave.py:131-143: check the inherited self.inks.get(...) directly on warm cache hits in QtNameWaveDelegate.text_inks, falling through to QtWaveBandCache.cached_band_inks on cache misses. Zero duplicated cache-build/eviction logic; zero extra Python calls on the hot paint path.

Verification

  • Focused pytest (tests/textual/test_name_wave_repaint.py, tests/model/test_android_perf_ux_arrivals.py) green, shadow_check.py 0, guarded_imports.py 0, REL_IMPORTS=0.

@trissim
trissim merged commit ef89678 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