Repository navigation
Bake name-wave accent bands into cached QTextLayouts (1.92x sidebar / 1.33x tab-bar wave speedup) - #2328
Merged
Conversation
… sidebar and 1.33x faster tab-bar wave painting
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.
Summary
selections(FormatRangelists) intoQTextLayout.draw(painter, origin, inks)on every 60–120 Hz name-wave frame forced Qt C++ onto its slow selection-splitting draw path (69.79 msvs29.05 msfor 5,000 draws — 2.4x slower).QtWaveBandCache.inks/cached_band_inkswithQtWaveBandCache.clone_layout+baked_band_layout(base, span)(bounded toBANDED_KEPT = 512, cleared on accent/font/style/palette changes) shared by bothQtNameWaveDelegateandQtSessionTabBar.QtNameWaveDelegate.text_inks,title_length,_painted_index, and_painted_span; both sidebar rows and busy tab titles now draw via Qt's fast selection-freeQTextLayout.draw(painter, origin)path.tests/model/test_android_perf_ux_arrivals.py:1314by passing a deterministicAnimationClock(..., now=lambda: 0.5).Alternating unprofiled wall-clock benchmarks (1 warm-up + 5 alternating runs)
QtNameWaveDelegate, 11 waving rows × 100 frames):draw(..., inks)): median 150.11 ms ([174.83, 116.01, 150.11, 161.53, 83.23])baked_band_layout): median 78.18 ms ([78.18, 84.24, 79.50, 48.54, 70.02])QtSessionTabBar, 3 waving tabs × 200 frames):[89.01, 95.30, 149.52, 88.80, 98.72])[65.97, 75.08, 69.79, 74.65, 71.88])Verification
REL_IMPORTS=0,tools/qt_inherit_ratchet.py: 0/0/0/0/0,tools/shadow_check.py: 0,tools/guarded_imports.py: 0pytest tests/textual/test_name_wave_repaint.py tests/model/test_android_perf_ux_arrivals.py: 42 passed in 0.84s