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(mysql): add StringInternPool to MySqlSqlExecutionDelegate row conversion #1356
In lib/features/mysql/mysql_sql_workspace.dart (lines 110–121):
final outRows = [
for (final row in taken.items)
List.generate(
row.numOfColumns,
(i) =>mysqlResultCellToDisplayString(row.colAt(i), column: col),
),
];
mysqlResultCellToDisplayString in lib/core/database/mysql_result_cells.dart supports an optional StringInternPool? pool parameter, but MySqlSqlExecutionDelegate never passes a pool.
Unlike PostgreSQL (which uses StringInternPool via convertPostgresResultRowsToStringsAdaptive), MySQL allocates fresh string instances for every single cell. For large result sets with repetitive status, boolean, foreign key, or category values, this creates tens of thousands of duplicate heap string allocations.
Proposed Solution
Instantiate and pass a StringInternPool during MySQL row generation in MySqlSqlExecutionDelegate.executeQuery.
Yield to the event loop every kResultStringConvertYieldEvery rows during conversion to prevent UI frame hitching.
Acceptance Criteria
Identical string cell values across rows in MySQL share interned references.
Memory usage during MySQL query execution is measurably reduced.
Activity
ZhuchkaTriplesix commentedon Oct 11, 2026
Done in #1410 (merged into
dev).