Repository navigation
Cut tab-bar paint enum overhead and disable Android composer auto-focus on tab switch - #2347
Merged
Merged
Conversation
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
Eliminated
enum.pyper-frame overhead inQtSessionTabBar.paintEvent(39.9 -> 0.8Python calls/frame inshipped_run.py, 50× reduction):_tab_chromeon pure integers/booleans(tab_w, tab_h, selected, hovered, pos_tag, adj_selected, dpr)and constructedQStyleOptionTabonly on chrome cache miss (eliminating 84/87 Pythonenum.pycalls per warm frame).QtTabMarquee.repaint()(painted_offsets) instead of callinganimation.frame()insidepaintEvent.tools/frame_work_baseline.json(name_wave.QtNameWaveDelegate.paint:37.7 -> 26.9).Stopped Android tab switches from auto-focusing the composer & popping the soft keyboard:
auto_focus_composer: ClassVar[bool] = TrueonPlatform(src/toad/client/platform.py), overridden toFalseonAndroidPlatform.ComposerPlaceholder(src/toad/qt/conversation.py) andComposerEditor(src/toad/qt/composer.py) toQt.FocusPolicy.ClickFocuswhennot host.auto_focus_composersoQStackedWidget.setCurrentWidgetnever transfers focus into the input box.ComposerPlaceholder.focusInEventandComposerEditor.focusInEventIME show onQt.FocusReason.MouseFocusReason(explicit tap on composer or placeholder still raises the keyboard immediately).release_pooled_composer) and cleared focus + hid IME on tab switch (QtWorkspaceViews.select/swap_page) whennot host.auto_focus_composer.Verification
REL_IMPORTS=0tools/qt_inherit_ratchet.py:0 / 0 / 0 / 0 / 0(Qt-only:47)test_android_perf_ux_arrivals.py,test_name_wave_repaint.py):49 passedin 0.99stools/android/check.sh(full shipped-app check +shipped_run.py+frame_workgate):ALL_CHECKS_PASSED(QtSessionTabBar.paintEvent:0.8Python calls/frame;QtNameWaveDelegate.paint:25.6vs baseline26.9).