Repository navigation
perf(quick-switcher): cut the main-thread stalls of opening Open Quickly - #3888
Merged
Merged
Conversation
datlechin
enabled auto-merge (squash)
October 29, 2026 17:36
datlechin
disabled auto-merge
October 29, 2026 17:40
datlechin
enabled auto-merge (squash)
October 29, 2026 17:52
datlechin
added a commit
that referenced
this pull request
Oct 30, 2026
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
QuickSwitcherViewModelinstead of building anNSPanelandNSHostingControllerand measuring them at a full-screen proposal.QuickSwitcherPanelController.presenttakesretainsPanel. Jump to Column, the toolbar switchers and the recent tab switcher still get a fresh panel, released on close.QuickSwitcherPanelViewtakes its model from the caller, and its loads are keyed by the model, so a swapped model loads on its own.QuickSwitcherViewModel.releaseResults(): the hidden model drops its results, stops observing the catalog, and its in-flight loads drop what they bring.WindowAccessorinstalled them only once, which would have left them on the previous model.DatabaseTreeRenderInputsleaves the listing out without a search, since the outline reads it only under one. Open Quickly requests that listing on Oracle and PostgreSQL, and its landing was a 100 ms-plus turn of sidebar row layout.Test plan
QuickSwitcherPanelControllerTests.retainedPanelSwapsItsModelchecks that reopening returns the same window, sends Cmd-2 to the new model and releases the old one.QuickSwitcherViewModelTests.releasedModelDropsResultschecks that a released model is empty and ignores a later load and search.closingReleasesTheViewModelstill covers the non-retained path.DatabaseTreeReconcileTests.listingStartingToLoadIsNoChangenow passes a search, and checks that a landing with an empty search leaves the inputs equal.main, 4 opens per fixture. These are the main thread's CPU samples per warm open, at 1 ms each. They were measured on a build of the same panel path before release on close was added:close()and reopen. SettingstringValuewhile editing keeps editing, so the field still has focus when the panel reopens.Refs #3661