perf(runner): build the provider map once per file, not twice#817
Merged
Conversation
The data-provider map was scanned by awk twice per test file: once inside the header's test-counting subshell (whose single-entry cache died with it) and again by the runner. The count loop now builds the map in its own shell before entering the counting subshell, and the header reads the total through a return slot instead of a $(...) capture — so the cache survives into the runner, which hits it for single-file runs (the acceptance suite's ~258 nested runs are all single-file). Multi-file runs keep today's behaviour for all but the last file (single-entry cache). 3 -> 2 awk forks per single-file run; stdout contract of find_total_tests is unchanged for existing callers/tests.
Chemaclass
added a commit
that referenced
this pull request
Jul 16, 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.
🤔 Background
Last per-file redundancy from the fork census (#801-#815): the data-provider map was awk-scanned twice per test file — once in the header's test-counting
$(...)subshell (whose cache dies with it) and again by the runner.💡 Changes
$(...)capture, so the cache survives into the runner.find_total_tests' stdout contract kept.