perf(runner): reduce subprocess overhead in hot paths#621
Merged
Chemaclass merged 3 commits intomainfrom Apr 17, 2026
Merged
Conversation
…lt_sync Drop six echo|sed subprocesses and one grep per sync test result parse at src/runner.sh:971. Use bash parameter expansion (##*, %%##*) in a single case branch, matching the pattern already used by the async path at lines 714-727. Bash 3.0+ compatible.
Replace fixed 50ms poll with stepped backoff (50ms -> 100ms after 4 iterations -> 200ms after 20) in src/runner.sh:15. Long-running parallel tests no longer spawn `jobs -r | wc -l` 20 times per second per wait; short tests keep the original responsiveness. Bash 3.0+ compatible.
…rovider_args Merge the leading-metachar and embedded-metachar grep calls at src/runner.sh:263 into one `(^|[^\])[|&;*]` pattern. Saves one grep subprocess per parametrized test invocation. Bash 3.0+ compatible.
Contributor
✅ Contributor ReportUser: @Chemaclass This user is on the trusted contributors list and was automatically approved. |
JesusValeraDev
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
echo | sed+ onegrepinparse_result_syncwith bash parameter expansion (mirrors existing fast path inparse_resultatsrc/runner.sh:714-727).wait_for_job_slotwith stepped adaptive backoff (50ms → 100ms after 4 iterations → 200ms after 20) to cutjobs -r | wc -lchurn on long parallel runs.parse_data_provider_argsinto one(^|[^\])[|&;*]pattern.All changes Bash 3.0+ compatible. No public API or behavior changes.