Skip to content

perf(results): avoid double-copy compute for row→string conversion #421

Description

@ZhuchkaTriplesix

Parent

Part of #414

Problem

Postgres / MySQL / SQLite workspaces build List<List<Object?>>, then compute(...) when length > 500. Cross-isolate copy of the whole matrix often dominates toString work → peak ≈ row matrix for large caps (up to 100k).

Evidence

  • lib/features/postgresql/postgres_sql_workspace.dart (~353–365)
  • lib/features/mysql/mysql_sql_workspace.dart (~195–213)
  • lib/features/sqlite/sqlite_sql_workspace.dart (~172–179)
  • lib/features/postgresql/postgres_table_view.dart (~190–194)

Acceptance

  • Large results convert without shipping a second full matrix copy when avoidable
  • UI stays responsive; document strategy (stream convert / single background isolate / yield loop)
  • Benchmark or comment with measured approach for 10k+ rows

Suggested fix

Convert while streaming on one background isolate; or in-place convert with yields for mid-size results.

Metadata

Metadata

Labels

coreCore library logic and servicesperformanceTheme parser epic label: performance

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions