Skip to content

perf(trees): gate QueryaAnimatedExpand / AnimatedContainer for large trees and Motion Off #726

Description

@ZhuchkaTriplesix

Problem

Parent: #723

Native trees wrap sections in QueryaAnimatedExpand → AnimatedSize (connection expand, Databases, schemas, object groups). During the animation Flutter re-layouts the growing child every frame.

SDUI explicitly avoids height morph on the flat list because it fights itemExtent and costs FPS.

_PgTreeRow also uses AnimatedContainer for selection fill on every row.

Proposal

  1. When Motion is Off / OS reduce-motion: snap expand (already mostly via duration tokens) — verify zero AnimatedSize ticks.
  2. When expanding a node with child count above a threshold (e.g. > 24), skip height morph (instant show) even on Full motion — same spirit as SDUI.
  3. Optional: selection highlight without AnimatedContainer when Reduced/Off or when using flattened list.
  4. Keep chevron rotation (cheap) for feedback.

Acceptance

  • Large expand (100+ tables) does not run multi-frame AnimatedSize layout on Full motion (or documents intentional skip)
  • Motion Off: expand/collapse is instant with no leftover controllers
  • Profile timeline attached for before/after on a large PG schema

Files

  • lib/core/motion/querya_animated_expand.dart
  • connections_panel_* expand sites
  • _PgTreeRow / SDUI row decoration

Activity

  1. added
    performanceTheme parser epic label: performance
    accessibilityReduced motion, OS accessibility preferences
    motionAnimation system, transitions, motion tokens
    uiUser interface components and widgets
    connectionsDatabase connections, URI parsing, pools
    on Sep 19, 2026
  2. ZhuchkaTriplesix commented on Sep 19, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Shipped in #735

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

    accessibilityReduced motion, OS accessibility preferencesconnectionsDatabase connections, URI parsing, poolsmotionAnimation system, transitions, motion tokensperformanceTheme 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