Repository navigation
perf(sidebar): reload only the changed outline rows and scope the catalog per connection - #4334
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
catalogGenerationfromDatabaseTreeRenderInputs. The outline now compares what it draws by value, across every field of a row.NSOutlineViewasremoveItems,insertItemsandreloadItemon the rows that changed. A whole reload stays for a layout switch, a forced wake and a row that moved between parents.DatabaseTreeNodeCachefinds a selected table's rows through an index, and drops rows no rebuild has listed for 8 passes.SidebarViewModelfilter caches key on the rows, because side lists commit before the catalog generation moves.ConnectionSidebarCatalogpublishes one connection's sidebar state.SidebarView,DatabaseTreeView,SidebarTreeView,SidebarSchemaFilterBanner,SchemaPickerControlandFavoritesTabViewobserve it in place of the service singletons.Measured in the test host, flat layout, one expanded section:
Test plan
DatabaseTreeReconcileTests,DatabaseTreeRowChangeTests,ConnectionSidebarCatalogTestsandSidebarViewModelMultiSectionTestscover row changes, selection, expansion, rename, node sweep and connection scoping. Nine reconcile cases fail with the mechanism reverted.DatabaseTreeReconcileTests:ownTablesReloadis nowownTablesChangeRows, andrecentTableReloadsis nowrecentTableAddsItsSection, since neither change callsreloadDataany more.SidebarTableTabUITestsandTemporaryTableSidebarUITestspass on a real build.