Skip to content

perf(sidebar): group the schema listing once per listing and draw Return as a symbol - #3889

Merged
datlechin merged 1 commit into
mainfrom
perf/3661-stalls
Oct 29, 2026
Merged

datlechin merged 1 commit into
mainfrom
perf/3661-stalls

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • The Return key in the Open Quickly and Jump to Column footers is the SF Symbol return. The system font has no U+21A9, so its first draw in a process loaded Lucida Grande as a fallback: 9 to 11 ms measured in a fresh process, inside the first Cmd-Shift-O. QuickSwitcherKeyHint takes a list of glyphs instead of one string.
  • The sidebar search groups the all-schema listing by schema once per listing. SchemaListingMatchesMemo reused the scan only for the same search, so every keystroke grouped all 50,000 rows again and copied each one.
  • DatabaseTreeFilter.filteredTables deduplicates by the fields TableInfo.id is built from, without escaping and joining a string for each matched row. On the Oracle fixture that string was 10 of 116 samples in a filter turn.

Test plan

  • New: DatabaseTreeFilterMemoTests.listingGroupingOutlivesTheSearch checks that a new search over the same listing keeps its rows grouped once and a new listing groups again. It fails on main, where each search builds new rows.
  • New: DatabaseTreeFilterTests.filteredTablesKeepsKindsApart checks that a table, a view and a temporary table of one name stay apart and a repeat is dropped.
  • Local: the DatabaseTreeFilter, DatabaseTreeFilterMemo, HierarchicalSchemaSearch, SidebarSchemaFilter, SidebarViewModel and Quick Switcher suites (162 tests) pass; lint clean.
  • Measured with a probe linked against AppKit in a fresh process: first layout of "↩" at 11 pt medium 8.8 to 11.2 ms, "⌘" 0.2 to 0.3 ms. The return symbol draws in 0.3 ms once any symbol has drawn, as sidebar and toolbar icons have before Open Quickly opens.
Before After
Before, light After, light
Before, dark After, dark

Refs #3661

@datlechin
datlechin enabled auto-merge (squash) October 29, 2026 21:43
@datlechin
datlechin merged commit 1a80a0b into main Oct 29, 2026
8 checks passed
datlechin added a commit that referenced this pull request Oct 30, 2026
@datlechin
datlechin deleted the perf/3661-stalls branch October 31, 2026 06:13
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