You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(grid): eliminate per-row List allocations and dynamic regex in clipboard export #1524
In GridSelectionManager / clipboard formatting logic (lib/features/workspace/grid/grid_selection_manager.dart), exporting table data creates heavy GC overhead:
toCsv and toTsv allocate a new final cells = <String>[]; on every single row, followed by cells.join(...). For 10,000 rows, this creates 10,000 intermediate lists.
toJson instantiates RegExp(r'^0\d+$') dynamically on cell evaluations and builds Map<String, dynamic> for each row before serialization.
Solution
Stream cell contents directly into StringBuffer using index checks: if (c > startCol) buffer.write(delimiter).
Replace dynamic RegExp with static cached regex or integer code unit checks (codeUnitAt).
Eliminate intermediate row lists and per-row maps.
Benefits
0 intermediate list allocations during CSV/TSV copy.
Significant throughput boost when copying tens of thousands of cells.
Activity
Merge pull request #1616 from QueryaHub/issue/1524-clipboard-export