Skip to content

perf(runner): emit per-test result payload with printf, not cat#806

Merged
Chemaclass merged 1 commit into
mainfrom
perf/per-test-cat-to-printf
Jul 15, 2026
Merged

perf(runner): emit per-test result payload with printf, not cat#806
Chemaclass merged 1 commit into
mainfrom
perf/per-test-cat-to-printf

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

Profiling a multi-test run surfaced a per-test fork: export_subshell_context emitted the encoded result payload with a cat <<EOF heredoc — one cat process per test.

💡 Changes

  • Build the same single-line payload with a \-continued string and print it with printf (a builtin) — no fork per test.
  • Output is byte-identical, so the result parser is unaffected; regression test added (fork census).
  • No behaviour change.

export_subshell_context emitted the encoded result payload via a `cat <<EOF`
heredoc, forking cat once per test. Build the same single line with a
`\`-continued string and print it with `printf` (a builtin) — no fork per
test. Output is byte-identical, so the result parser is unaffected.

No behaviour change.
@Chemaclass Chemaclass added the enhancement New feature or request label Jul 15, 2026
@Chemaclass Chemaclass self-assigned this Jul 15, 2026
@Chemaclass Chemaclass merged commit cc533fc into main Jul 15, 2026
37 checks passed
@Chemaclass Chemaclass deleted the perf/per-test-cat-to-printf branch July 15, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant