mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-04-28 06:59:37 +00:00
readViaStream (used for files ≥8 MB) reconstructs the full file as a
single string via chunks.join('\n'), giving the same peak allocation as
readFile. Callers then call content.split('\n'), creating a second copy.
With FILE_READ_CONCURRENCY=16 and files up to 128 MB this can exhaust
the V8 heap (~6 GB theoretical peak).
readSessionLines already exists as a proper async generator that yields
one line at a time. Switch both hot-path callers to iterate it directly
so the full file string is never held in memory.
Adds two tests: a spy test confirming readSessionLines is called (not
readSessionFile), and a 500-entry correctness test.
Fixes #131
|
||
|---|---|---|
| .. | ||
| fixtures/security | ||
| providers | ||
| security | ||
| bash-commands.test.ts | ||
| cli-plan.test.ts | ||
| compare-stats.test.ts | ||
| daily-cache.test.ts | ||
| dashboard.test.ts | ||
| date-range-filter.test.ts | ||
| day-aggregator.test.ts | ||
| export.test.ts | ||
| fs-utils.test.ts | ||
| menubar-json.test.ts | ||
| minimax.test.ts | ||
| models.test.ts | ||
| optimize-fs.test.ts | ||
| optimize.test.ts | ||
| parser-filter.test.ts | ||
| plan-usage.test.ts | ||
| plans.test.ts | ||
| provider-registry.test.ts | ||