Skip to content

perf(query): offload large SQL result set parsing to background compute isolate #522

Description

@ZhuchkaTriplesix

Problem

When executing SQL queries returning large result sets (e.g. 5,000–10,000+ rows across many columns), row string formatting and matrix processing can cause UI micro-jank on the main isolate. Currently, yields execution to the event loop periodically, but heavy object allocation still happens on the main UI isolate.

Proposed Solution

Investigate and benchmark offloading row parsing, data conversion, or lazy formatting to background isolates () or lazy cell formatting in .

Tasks & Evaluation

  • Benchmark memory overhead & IPC copy cost of vs yielding ().
  • Prototype lazy string conversion inside cell builder.
  • Test across Postgres, MySQL, SQLite, and Extension SQL workspaces.

Target Files

  • lib/core/database/result_row_string_convert.dart
  • lib/features/postgresql/postgres_sql_workspace.dart
  • lib/features/mysql/mysql_sql_workspace.dart
  • lib/features/sqlite/sqlite_sql_workspace.dart
  • lib/features/extensions/extension_sql_workspace.dart

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions