Skip to content

Conversation

@max-sixty
Copy link
Owner

Summary

  • Replace nested parallelism (Rayon par_iter → thread::scope per worktree) with flat Rayon-only approach
  • Previously ~104 OS threads (8 worktrees × 13 tasks), now uses Rayon's fixed-size pool (2× CPU cores)
  • Sort work items so local git ops run before network I/O (CI status, URL health checks)

Test plan

  • All unit tests pass (597)
  • All integration tests pass (757)
  • CI passes
  • Manual testing on repos with many worktrees

🤖 Generated with Claude Code

Replace nested parallelism (Rayon par_iter → thread::scope per worktree)
with a flat Rayon-only approach. Previously, with 8 worktrees × 13 tasks,
we could spawn ~104 OS threads. Now all tasks go into Rayon's fixed-size
pool.

Changes:
- Add WorkItem struct and dispatch_task() to replace TaskSpawner
- Generate all work items upfront, sort by is_network() so local git ops
  run before network I/O (CI status, URL health checks)
- Execute flattened work items via single into_par_iter()
- Configure global thread pool to 2× CPU cores for mixed I/O workloads
- Delete TaskSpawner and collect_*_progressive functions

The sorting ensures we're not waiting on slow network requests while
local git operations could be running.

Co-Authored-By: Claude <[email protected]>
@max-sixty max-sixty merged commit 734874c into main Jan 9, 2026
19 checks passed
@max-sixty max-sixty deleted the threads branch January 9, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants