feat: parallel test case execution #261
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/cp.nvim#261
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
run_all_test_casesinlua/cp/runner/run.luaruns test cases sequentially via a recursiverun_nextcallback. For problems with many test cases (e.g., 10+ after editing), this is significantly slower than necessary. Test cases are fully independent and there is no reason to serialize them.Proposed solution
Run all test cases concurrently using a counter-based completion barrier:
execute.runalready usesvim.uvasync I/O, so spawning multiple processes concurrently is safe. The panel render should handle partial updates as results arrive — which it already does since each test case's state is updated independently before re-rendering.A config option
parallel_tests = true(default true) would allow opt-out for systems with tight resource constraints.Alternatives considered
Keeping sequential execution. This is simpler but meaningfully slower for problems with 5-10 test cases, which is common after using
:CP editto add custom cases.