Skip to content

fix(csv): stream file export and build clipboard CSV off the UI isolate (#277) - #287

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/277-csv-streaming-isolate
Jul 10, 2026
Merged

fix(csv): stream file export and build clipboard CSV off the UI isolate (#277)#287
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/277-csv-streaming-isolate

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

  • Stream CSV file export through writeResultGridCsv + IOSink instead of building one large string before File.writeAsString.
  • Build clipboard CSV asynchronously via resultGridAsCsvAsync (Isolate.run) so large result grids no longer freeze the UI isolate.
  • Refactor resultGridAsCsv to use StringBuffer and add unit tests for streaming and async paths.

Fixes #277.

Test plan

  • flutter test test/core/csv/result_grid_csv_test.dart
  • Export a large result grid to CSV and confirm the UI stays responsive
  • Copy a large result grid as CSV and confirm clipboard contents match export

…te (#277)

- Write CSV to disk via IOSink in writeResultGridCsv instead of assembling
  one giant String before File.writeAsString.
- Add resultGridAsCsvAsync (Isolate.run) and use it for Copy as CSV so large
  grids do not freeze the Flutter UI isolate.
- Rebuild resultGridAsCsv with StringBuffer to reduce intermediate allocations.
- Cover streaming and async paths with unit tests.
@github-actions github-actions Bot added bug Something isn't working core Core library logic and services ui User interface components and widgets labels Jul 10, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit d189f3b into dev Jul 10, 2026
4 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/277-csv-streaming-isolate branch July 10, 2026 12:49
@ZhuchkaTriplesix ZhuchkaTriplesix self-assigned this Jul 12, 2026
ZhuchkaTriplesix added a commit that referenced this pull request Jul 27, 2026
fix(csv): stream file export and build clipboard CSV off the UI isolate (#277)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core Core library logic and services ui User interface components and widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant