Skip to content

perf(sidebar): build the find bar on first use and drop the Oracle listing's partition join - #3831

Merged
datlechin merged 2 commits into
mainfrom
perf/connection-window-first-build
Oct 25, 2026
Merged

datlechin merged 2 commits into
mainfrom
perf/connection-window-first-build

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • The editor builds its find bar on first show, as NSTextFinder does. A hidden FindPanelHostingView was still laid out on every SourceEditor, and SwiftUI inserting its pickers forced a layout of the whole editor area around them. Opening a connection window drops it from the turn that builds the restored query tab (17 to 19 ms of its own, plus the forced re-layouts). Every other editor (JSON, values, previews) gains the same.
  • Oracle's table listings read the partition flag from ALL_TABLES.PARTITIONED and no longer join ALL_PART_TABLES. Counts come from ALL_PART_TABLES in a separate read, only for owners that returned a partitioned table. A failed count read leaves the listing without counts. On 100 schemas of 500 tables, the listing's server time went from 0.73 to 2.77 s to 0.17 to 0.38 s; the count read takes 0.08 to 0.11 s.
  • Open Quickly no longer shows "No results" while a listing the sidebar started is still loading.
  • A sidebar search asks for a failed or partly unlisted all-schema listing once per search, not on every keystroke.
  • The List sidebar layout shows loading, not "No Results", while the other schemas' listing is in flight.

Still over budget (scripts/benchmark/large-catalog/baseline.json):

  • The restored query tab's editor still builds in one main-thread turn of 120 to 260 ms (machine load 10 to 56 from other jobs). What remains is visible: the query bar's SwiftUI controls, the SourceEditor, and the results pane.
  • Oracle's first sidebar keystroke measured 916 ms with the new plugin at load 13. Its old-plugin run and the full benchmark could not run: the Mac locked.

Test plan

  • New: FindPanelTests (built on first show, a term set before then is searched), OracleSchemaQueriesTests (no join, count read, owners, merge), QuickSwitcherListingDemandTests.listingAnotherReaderStartedCountsAsLoading (fails without the fix), SidebarSchemaFilterTests.failedListingIsAskedForOncePerSearch, SidebarObjectListPresentationTests.searchAwaitingTheListingIsNotAMiss.
  • Changed on purpose: OracleSchemaQueriesTests.testTableListingReadsPartitioningFromAllPartTables replaced; EditorKeyMonitorCompositionTests, TextViewControllerClippingTests, TextViewControllerTests read the find panel as optional.
  • Local: 292 hosted and editor tests, 320 swift test in TableProOracle, 19 iOS Oracle tests; lint clean. verify.sh plugins stopped at DamengDriver (no libdameng_bridge.a here); OracleDriver built on its own.

Refs #3661

@datlechin
datlechin merged commit b8798bd into main Oct 25, 2026
13 of 15 checks passed
@datlechin
datlechin deleted the perf/connection-window-first-build branch October 25, 2026 06:24
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.

2 participants