codeburn/app/scripts
iamtoruk cb9fa71623 perf(parser): parallelize the cold Claude parse across worker threads
Reading, decoding and line-parsing a Claude session JSONL is per-file work that
touches nothing shared, so it moves onto worker_threads for a large cold parse.
parseClaudeFileFull() is the extracted unit both sides run; a worker runs it
against an empty dedup set and returns the result as a JSON string, and the
parent installs results in the order the serial loop would. Everything with
cross-file state stays on the main thread, and a file whose message ids were
already claimed (or whose worker failed) re-parses in-process, so the output is
identical to the serial path.

Thread count is decided per parse: never with <=2 cores, under 2 GB free memory,
fewer than 200 pending whole-file re-parses or under 200 MB behind them, so warm
and incremental runs spawn nothing. CODEBURN_PARSE_WORKERS overrides it. The pool
is terminated when the parse ends, so the resident serve child accumulates no
threads.
2026-08-17 01:19:20 -07:00
..
after-pack.cjs feat(app): bundle the CLI inside the packaged app 2026-07-16 09:27:46 -07:00
buildStamp.test.ts fix(app): clean build stamp, splash without hash, About checks for updates 2026-07-17 14:30:00 -07:00
buildStamp.ts fix(app): clean build stamp, splash without hash, About checks for updates 2026-07-17 14:30:00 -07:00
stage-cli.mjs perf(parser): parallelize the cold Claude parse across worker threads 2026-08-17 01:19:20 -07:00