Repository navigation
Cache sidebar row QImages (11x paint speedup, frame_work 69.3->37.7), fix CoalescedQEventLoop re-entrancy, clear NRA gate - #2330
Merged
Conversation
…7.7), fix CoalescedQEventLoop re-entrancy, clear NRA gate
- QtNameWaveDelegate.paint (src/toad/qt/name_wave.py): cache rendered
row QImages keyed by (id(row), span, width, height, state._value_,
wraps, dpr), invalidated in forget_rows() and _set_wave_accent(), with
try/finally QPainter.end() and active-flash passthrough.
- 60-frame waving sidebar benchmark (12 rows): 55.4ms -> 5.0ms (11x).
- Scratch-bus frame_work gate: 69.3 -> 37.7 Python calls/frame (-45.6%),
verified 38.0 within baseline, 0px sideways, accent drawn 15-16/20 looks.
- CoalescedQEventLoop._drain_ready (src/toad/qt/client_start.py): defer
draining ready handles when asyncio.current_task(self) is not None
(re-entrant QApplication.processEvents() / modal exec() inside an
asyncio Task), preventing RuntimeError: Cannot enter into task and
dropped task wakeups that deadlocked close_client().
- tools/qt_scroll_profile.py: run on CoalescedQEventLoop (matching
desktop/Android), isolate XDG_CONFIG_HOME/XDG_STATE_HOME under OUTDIR,
and remove bare task-cancel/quit in finally. Live #comms (412x915):
clean SCROLL_RC=0, fling frame p95 0.826ms / latency p95 3.393ms,
arrival reader jump 0px.
- Clear NRA semantic_refactor_gate (1->0) and own_type_test:
- ChannelRowTone(HueToneColour) in src/toad/client/theme_tones.py,
ChannelRowFace.row_tones derived via tuple(ChannelRowTone.__subclasses__()).
- LineBlock.triggers_header_collapse (True on Divider) replacing
isinstance(blocks[block_index], Divider) in QtHistoryWindow._header_collapse_at.
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
Sidebar row
QImagecache (src/toad/qt/name_wave.py,tools/frame_work_baseline.json):QtNameWaveDelegate.paintcaches rendered rowQImages per(id(row), span, width, height, state._value_, wraps, dpr), cleared inforget_rows()and_set_wave_accent(), passing active flash rows straight through tosuper().paint()and closingQPainterintry/finally.frame_workgate: 69.3 -> 37.7 Python calls/frame (-45.6%); verified follow-up run38.0within baseline,0 pxsideways drag, accent drawn15–16/20looks.CoalescedQEventLoopre-entrantprocessEvents()deadlock fix (src/toad/qt/client_start.py,tools/qt_scroll_profile.py):_drain_ready()now defers ready callbacks whenasyncio.current_task(self) is not None, preventingRuntimeError: Cannot enter into task ... while another task ... is being executedand lost task wakeups whenprocessEvents()or a modalexec()runs inside an asyncio task.tools/qt_scroll_profile.pytorun_qt_loopwithXDG_CONFIG_HOME/XDG_STATE_HOMEisolated underOUTDIRand clean shutdown. Live#comms(412x915) exitsSCROLL_RC=0withflingframe p95 0.826 ms / latency p95 3.393 ms,wheelframe p95 0.537 ms,arrivaljump 0 px.Clear NRA
semantic_refactor_gate(1 -> 0) +own_type_test(src/toad/client/theme_tones.py,src/toad/sidebar_rows.py,src/toad/client/line_blocks.py,src/toad/qt/history.py):ChannelRowTone(HueToneColour)and derivedChannelRowFace.row_tones = tuple(ChannelRowTone.__subclasses__()), clearing Toad's solesemantic_mirror_without_descentboundary finding (b662823ada).LineBlock.triggers_header_collapse(TrueonDivider), removingisinstance(..., Divider)(IMPL-3) atQtHistoryWindow._header_collapse_at.Verification
REL_IMPORTS=0,qt_inherit_ratchet.py:0/0/0/0/0,shadow_check.py:0,guarded_imports.py:0.tests/textual/test_name_wave_repaint.py+tests/guards/test_shared_frontend_members.py:17 passed in 0.32s.tests/model/test_android_perf_ux_arrivals.py:5 passed in 0.29s.semantic_refactor_gategate_active: False, boundary: 0.