Skip to content

perf(ui): reduce rebuilds and virtualize heavy surfaces (#93) - #94

Merged
ZhuchkaTriplesix merged 22 commits into
devfrom
issue/93-ui-perf
Jun 13, 2026
Merged

perf(ui): reduce rebuilds and virtualize heavy surfaces (#93)#94
ZhuchkaTriplesix merged 22 commits into
devfrom
issue/93-ui-perf

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

  • Decouple UI scale preview from app-wide theme rebuilds; narrow splitter, connections panel, and connection form rebuild scopes.
  • Virtualize SQL result grid and connection tree lists; debounce syntax highlighting and run it in a worker isolate with pair caching.
  • Skip stats dashboard repaints when polled snapshots are unchanged; redesign Redis/Mongo stats layouts and add a full MySQL server stats dashboard.
  • Virtualize Redis key member lists, lazy Mongo document JSON, MySQL result formatting in isolate, and remove hover setState from Redis/Mongo explorer rows.
  • Add local docker/ compose stack for dev databases (postgres, mysql, mongo, redis).

Closes #93

Test plan

  • flutter test (385 tests)
  • Hot-restart app; drag UI scale slider — main screen should not jank on every tick
  • Run SQL query with 1000+ rows — result grid scrolls smoothly
  • Expand PostgreSQL/MySQL connection tree with many tables — no full-panel stutter
  • Open Redis/Mongo/MySQL/Postgres stats — no overflow stripes; metrics refresh every few seconds
  • Hover Redis keys / Mongo databases rows — highlight works without list-wide rebuilds
  • Optional: cd docker && docker compose up -d — connect to localhost services with querya / querya

Keep interface scale drag local to the preferences slider; commit once on
release. Split theme and scale ListenableBuilders, cache ThemeData, and
stop bumping AppSettingsRevision on ui_scale writes.
Remove synchronous highlight on the UI thread; debounce scheduling by 100ms
and route all jobs through compute. Update editor tests to flush timers.
Replace material.Table with VirtualResultGrid using ListView.builder,
fixed column widths, and lighter cell widgets for large query results.
Virtualize large PG/MySQL object lists via lazyConnectionTreeList, drop
per-row TextPainter in tree labels, and build top-level panel with SliverList.
Menu overlay context unmounted before the second dialog, so New Database Connection stopped after Next.
Use ValueNotifier split panes, SqlWorkspaceSettingsRevision, connection-id panel slot, and FormValidityNotifier for connection dialogs.
Provide postgres, mysql, mongo, and redis with seed data for manual testing.
Shared snapshot diffing for stats views to skip setState when polled data is unchanged.
Use replaceIfChanged and hoist the version RegExp to avoid redundant rebuild work.
Reuse HighlighterPair instances instead of rebuilding on every createPair call.
Avoid allocating a RegExp on every preview line render.
Move cell string conversion off the UI thread for large result sets.
Avoid hover setState and defer pretty JSON encoding until expand.
Ellipsize trigger text inside bounded width to prevent horizontal overflow.
Use separated list builders for hash/list/set/zset rows and dispose TTL controller on close.
Query SHOW GLOBAL STATUS/VARIABLES and information_schema for the stats dashboard.
Replace the version-only stub with polled metrics cards and a databases table.
Align card grid layout with other engines and fix header/dropdown overflow.
Use equal-height metric cards, human-readable labels, and replaceIfChanged polling.
Use InkWell hoverColor and always-visible row actions instead of per-row rebuilds.
Use InkWell hoverColor for row highlights and stateless action buttons.
@github-actions github-actions Bot added the enhancement New feature or request label Jun 13, 2026
Satisfies unnecessary_string_interpolations analyzer rule in CI.

@ZhuchkaTriplesix ZhuchkaTriplesix left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

123

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit c26cf01 into dev Jun 13, 2026
4 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/93-ui-perf branch June 13, 2026 20:09
ZhuchkaTriplesix added a commit that referenced this pull request Jul 27, 2026
perf(ui): reduce rebuilds and virtualize heavy surfaces (#93)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant