Repository navigation
perf: bound peak memory & hot-path algorithms (post-0.4.11 audit) #414
Copy link
Copy link
Closed
Labels
coreCore library logic and servicesCore library logic and servicesepicEpic / umbrella issueEpic / umbrella issueperformanceTheme parser epic label: performanceTheme parser epic label: performance
Description
Context
Static algorithm review of main (2026-07-27, post-0.4.11 / 0.4.11-a) found remaining peak-memory and hot-path weaknesses. Several older tickets were closed after partial fixes (injectSqlLimit, MySQL rowsStream, CSV isolate, Redis Future.wait) but gaps remain.
Source: Cursor algorithm review of main @ ~9a4648e.
Problem pattern
Cap / display N rows while still materializing the full source in Dart (SQL fetch, export string, zip bytes, RPC JSON line).
Child issues
P0 — peak memory
- perf(sqlite): inject LIMIT / stop unbounded rawQuery then take(cap) #415 SQLite: unbounded
rawQuerythen.take(cap) - perf(postgres): stream or clamp LIMIT — avoid full Result buffer #416 Postgres: full
Resultbuffer despite UI cap /injectSqlLimit - perf(export): stream DataExportService to disk (stop giant String) #417 Export:
DataExportServicegiantString(streaming CSV unused by UI) - perf(marketplace): stream SHA256 + zip extract (no dual full buffers) #418 Marketplace / sideload zip: full-buffer hash + decode
- perf(extensions): bound and chunk RPC query result payloads #419 Extension RPC: unbounded NDJSON query result line
- perf(sdui): virtualize SduiTreeBuilder (no full Column of expanded nodes) #420 SDUI tree: no virtualization
- perf(results): avoid double-copy compute for row→string conversion #421 Result→string via
computedoubles matrix peak
P1 — UI / I/O latency
- perf(mysql): offload table browse row→string conversion from UI isolate #422 MySQL table browse: sync convert on UI isolate
- perf(ui): 2D virtualization for VirtualResultGrid (wide columns) #423 VirtualResultGrid: columns not virtualized
- perf(editor): honor kSyntaxHighlightIsolateThreshold #424 Syntax highlight:
kSyntaxHighlightIsolateThresholdunused - perf(theme): incremental theme registry rescan (skip unchanged files) #425 Theme registry: full rescan every watcher event
- perf(redis): pipeline TYPE/TTL for SCAN batches (#187 follow-up) #426 Redis: pipeline TYPE/TTL (Performance: Sequential Network Round-Trips in Redis Key Scanner #187 follow-up)
- perf(sandbox): bound stderr carry to avoid O(n²) on huge lines #427 Sandbox stderr: O(n²) risk on huge lines
- perf(storage): SQL history index + prune without nested OFFSET delete #428 SQL history: prune/index shape
Already OK (do not reopen)
- MySQL SQL workspace
rowsStream+ client cap - Updater streaming SHA256
writeResultGridCsvhelper (needs UI wiring → perf(export): stream DataExportService to disk (stop giant String) #417)- Vertical
VirtualResultGrid+itemExtent - Theme parse LRU for full
QueryaTheme
Acceptance
- Child issues linked with
Parent: #414 - Each P0 has measurable memory / streaming acceptance criteria
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coreCore library logic and servicesCore library logic and servicesepicEpic / umbrella issueEpic / umbrella issueperformanceTheme parser epic label: performanceTheme parser epic label: performance
Activity
ZhuchkaTriplesix commentedon Jul 27, 2026
All child issues #415–#428 shipped on
dev. Peak-memory + hot-path audit complete.