Enable parallel checkout for faster worktree creation
Some checks failed
CI / Check for .beads changes (push) Has been skipped
CI / Check embedded formulas (push) Successful in 18s
CI / Test (push) Failing after 1m19s
CI / Lint (push) Successful in 18s
CI / Integration Tests (push) Successful in 1m2s
CI / Coverage Report (push) Has been skipped
Windows CI / Windows Build and Unit Tests (push) Has been cancelled
Some checks failed
CI / Check for .beads changes (push) Has been skipped
CI / Check embedded formulas (push) Successful in 18s
CI / Test (push) Failing after 1m19s
CI / Lint (push) Successful in 18s
CI / Integration Tests (push) Successful in 1m2s
CI / Coverage Report (push) Has been skipped
Windows CI / Windows Build and Unit Tests (push) Has been cancelled
Add EnableParallelCheckout() helper to git package and call it when creating bare repos. This configures checkout.workers=0 (auto-detect cores) and checkout.thresholdForParallelism=100. Expected 2-8x speedup on SSD for large repos (e.g., java rig with 85k files). Based on research in hq-dqc7t (APFS CoW optimization). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,8 +13,8 @@ import (
|
||||
|
||||
"github.com/steveyegge/gastown/internal/beads"
|
||||
"github.com/steveyegge/gastown/internal/claude"
|
||||
"github.com/steveyegge/gastown/internal/constants"
|
||||
"github.com/steveyegge/gastown/internal/config"
|
||||
"github.com/steveyegge/gastown/internal/constants"
|
||||
"github.com/steveyegge/gastown/internal/git"
|
||||
)
|
||||
|
||||
@@ -342,6 +342,13 @@ func (m *Manager) AddRig(opts AddRigOptions) (*Rig, error) {
|
||||
fmt.Printf(" ✓ Created shared bare repo\n")
|
||||
bareGit := git.NewGitWithDir(bareRepoPath, "")
|
||||
|
||||
// Enable parallel checkout for faster worktree creation on large repos.
|
||||
// This is especially beneficial for repos with 10k+ files (e.g., java rig).
|
||||
if err := bareGit.EnableParallelCheckout(); err != nil {
|
||||
// Non-fatal: parallel checkout is an optimization, not required
|
||||
fmt.Printf(" Warning: could not enable parallel checkout: %v\n", err)
|
||||
}
|
||||
|
||||
// Determine default branch: use provided value or auto-detect from remote
|
||||
var defaultBranch string
|
||||
if opts.DefaultBranch != "" {
|
||||
|
||||
Reference in New Issue
Block a user