Skip to content

perf(trees): flatten native connection tree into one virtualized list (drop nested shrinkWrap) #724

Description

@ZhuchkaTriplesix

Problem

Parent: #723

lazyConnectionTreeList (connections_panel.dart) builds either:

  • a full Column when itemCount ≤ 24, or
  • ListView.builder(shrinkWrap: true) capped to 14× row height

These sit inside QueryaAnimatedExpand → AnimatedSize, which itself sits inside the outer sidebar SliverList item for each expanded connection.

Effect: nested scrollables + shrink-wrap layout passes during expand and when scrolling the outer panel — high risk of dropped frames at 120/144 Hz with large schemas/table lists.

SDUI already flattens to a single ListView.builder and skips height morph for this reason.

Proposal

  1. Flatten expanded native tree (connection → DB → schema → groups → leaves) into one virtualized list (prefer patterns like SDUI flatten, or Flutter TreeSliver if it fits desktop sidebar).
  2. Remove nested ListView(shrinkWrap: true) under the outer CustomScrollView.
  3. Keep fixed itemExtent (kConnectionTreeRowExtent) where possible.
  4. Coordinate with visual parity #719 so one row widget serves native + SDUI.

Acceptance

  • Expanding a PG database with hundreds of tables does not nest a shrink-wrapped ListView inside the sidebar SliverList
  • Only viewport (+ cacheExtent) rows are built
  • Profile @ 120 Hz: expand + scroll stay within budget (attach timeline screenshot)
  • Existing selection / context menu / filter behavior preserved

Files

  • lib/features/connections/connections_panel.dart (lazyConnectionTreeList)
  • connections_panel_pg_tree.dart, _mysql, _sqlite, _mongo, _redis
  • lib/core/sdui/sdui_tree_builder.dart (reference)

Activity

  1. added
    frontendTheme parser epic label: frontend
    performanceTheme parser epic label: performance
    uiUser interface components and widgets
    connectionsDatabase connections, URI parsing, pools
    on Sep 19, 2026
  2. added a commit that references this issue on Sep 19, 2026
  3. ZhuchkaTriplesix commented on Sep 19, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Shipped in #737 (drop shrinkWrap; virtualize fixed-extent leaves). Full single-sliver flatten deferred; remaining QA on #739.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    connectionsDatabase connections, URI parsing, poolsfrontendTheme parser epic label: frontendperformanceTheme parser epic label: performanceuiUser interface components and widgets

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions