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(database): zero-allocation hex formatting for BLOB/Bytea and eliminate split in date cell rendering #1529
In postgres_result_cells.dart (lib/core/database/postgres_result_cells.dart):
postgresByteaHexDisplay loops over Uint8List and calls b.toRadixString(16).padLeft(2, '0') for each byte. For a 2KB binary blob, this creates 4,096 temporary strings.
In date-only cells, value.toIso8601String().split('T').first allocates a 2-element list and discards the second element on every date cell of every row (e.g. 50,000 lists for 50,000 rows).
Solution
Use a static hex character lookup table (const _hexDigits = '0123456789abcdef') and write char codes directly without intermediate toRadixString or padLeft allocations.
Extract the date substring (iso.substring(0, 10)) or format directly without split('T').
Benefits
0 intermediate string allocations per byte in binary cell rendering.
0 List allocations when displaying date columns in query results.
Activity
Merge pull request #1615 from QueryaHub/issue/1529-cell-formatting