FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

perf(export): stream DataExportService to disk (stop giant String) · Issue #417 · QueryaHub/Querya-Desktop · GitHub

perf(export): stream DataExportService to disk (stop giant String) #417

Description

Parent

Part of #414

Problem

Primary export UI path (DataExportService.formatAsync / saveToFile) builds one giant String (CSV/JSON/Markdown/SQL) on an isolate, then File.writeAsString.

Streaming helper writeResultGridCsv already exists but is not used by this path. Wide × 10⁵-row grids → O(cells) heap + full matrix copy into the isolate.

Evidence

  • lib/shared/services/data_export_service.dart (~147–219)
  • Callers: results_tab.dart, extension_table_view.dart
  • Unused stream: lib/core/csv/result_grid_csv.dart (writeResultGridCsv)

Related

#277 fixed sync UI-isolate CSV freezes; this is the remaining full-document materialization issue across formats.

Acceptance

  • File export streams to IOSink for CSV (and preferably JSON/SQL)
  • UI wires large exports through streaming path; clipboard may stay string-based with size guard
  • No full-string build for file export of ≥N rows (document threshold)
  • Smoke test / unit test for streamed write

Suggested fix

Reuse writeResultGridCsv; add streaming JSON/SQL writers; “export to file only” for oversized sets.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

coreCore library logic and servicesperformanceTheme 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


    Back | FazBrowse Home | New Git URL