Repository navigation
perf(sidebar): time and fix the sidebar, Open Quickly and autocomplete on 50,000 tables - #3830
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
scripts/benchmark-large-catalog.shtimes, on the Measure the sidebar, Open Quickly and autocomplete on 100 schemas and 50,000 tables #3661 fixtures (PostgreSQL and Oracle with 100 schemas of 500 tables, MySQL with one database of 50,000), the sidebar's first listing after connect, one filter keystroke and opening a schema, Open Quickly's panel and first result, completion afterFROMand afterschema.(MySQL:database.), and resident memory. 10 runs each, budgets inscripts/benchmark/large-catalog/baseline.json(1.25x the first run's median and p95). A step also fails when the main thread stalls for more than 100 ms during it.TABLEPRO_INTERACTION_TRACE=1:InteractionTracer(Interactionintervals under Points of Interest, one stderr line each) andMainThreadStallMonitor(each main run loop turn of 50 ms or more). NewCodeSuggestionDelegate.completionWindowDidShow(textView:itemCount:).DatabaseTreeRenderInputs); filter buckets, listing matches and table rows are memoized across refreshes;SidebarSearchranks in one pass; the listing's 50,000-row mapping runs off the main actor.schema.finds an unquoted schema in any case and keeps a quoted one as written.database.lists that database's tables on an engine without schemas.@Tables menu lists the first 100 tables;@in the message finds any other.list_indexesreads a whole schema's indexes in one query where the driver supports it.Before is the first run (2026-10-22, now the baseline), after is this branch. Release build, 10 runs, Mac16,11 (M4 Pro, 24 GB, macOS 27.0.1), PostgreSQL 17 local, Oracle Free 23 and MySQL 8.4 in containers, load 4 to 8.
Resident memory with the table list loaded: PostgreSQL 182 MB, Oracle 162 MB, MySQL 492 MB (before: 119, 194, 772).
Still over:
Before / After
Oracle, typing
LC_S050in the sidebar. Before: type-select skips schema rows and lands on a table. After: the schema row is selected.AI chat footer
@> Tables on a schema of 500 tables. Before: all 500. After: the first 100 and a hint to type@.Test plan
DatabaseTreeReconcileTests,DatabaseTreeFilterMemoTests,DatabaseTreeHierarchicalSearchTests,InteractionTraceRecorderTests,DatabaseObjectToolSupportTests,AIChatTableMentionsTests,AIChatViewModelSchemaRankingTests,MCPListIndexesTests,OracleRowLimitsTests, and cases inQuickSwitcherListingDemandTests,SQLSchemaProviderUnqualifiedScopeTests,SQLCompletionProviderCatalogTests,SQLContextAnalyzerQuotedReferenceTests,DatabaseTreeNodeTests,SuggestionLiveCursorTests,SidebarSearchTests,SidebarNameFilterTests.AllSchemaTablesDemandTests.resetForgetsEarlierRequests(a reset asks again only for a listing that is not current).swift testfor TableProAutocomplete (475) and TableProOracle (316); lint clean.Refs #3661