Skip to content

perf(ui): eliminate speculative layout overhead from IntrinsicWidth in QueryaTabStrip - #1428

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1342-querya-tab-strip-intrinsic-width
Oct 11, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1342-querya-tab-strip-intrinsic-width

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1342

Summary of Changes

  1. Conditional IntrinsicWidth via LayoutBuilder:
    • In QueryaTabStrip, wrapped the scrollable tab strip in a LayoutBuilder checking constraints.hasBoundedWidth.
    • When parent width constraints are bounded (e.g. inside Expanded / Flexible / SizedBox across SqlQueryTabBar, GenericTableView, ResultsTab, ErdView), IntrinsicWidth is bypassed completely, eliminating redundant (N)$ speculative layout passes on every frame and rebuild.
    • When parent constraints are unconstrained horizontally (e.g. unconstrained Row from fix(tabs): wrap QueryaTabStrip in horizontal scrollable and preserve GlobalKeys on tab count change #898), falls back to IntrinsicWidth to prevent unbounded flex scroll errors.
  2. Tests:
    • Added unit tests in test/shared/querya_tab_strip_test.dart verifying that IntrinsicWidth is eliminated when parent width is bounded and retained as a fallback when unconstrained.

@github-actions github-actions Bot added frontend Theme parser epic label: frontend performance Theme parser epic label: performance ui User interface components and widgets P2 Medium priority / Parity & Refactoring labels Oct 11, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 009c5b0 into dev Oct 11, 2026
13 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/1342-querya-tab-strip-intrinsic-width branch October 11, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Theme parser epic label: frontend P2 Medium priority / Parity & Refactoring performance Theme parser epic label: performance ui User interface components and widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant