Skip to content

feat: add performance optimizations and griptree command - #50

Merged
laynepenney merged 4 commits into
mainfrom
feat/perf-griptrees
Jan 29, 2026
Merged

feat: add performance optimizations and griptree command#50
laynepenney merged 4 commits into
mainfrom
feat/perf-griptrees

Conversation

@laynepenney

Copy link
Copy Markdown
Member

Summary

  • Parallelize push, sync, and commit commands using Promise.all for better performance
  • Add GitStatusCache class for caching git status calls within command execution
  • Add griptree commands for worktree-based multi-branch workspaces

Performance Improvements

Expected 3-5x speedup for workspaces with 5+ repos on push, sync, and commit operations.

New Commands

  • gr griptree add <branch> - create parallel workspace on a branch
  • gr griptree list - show all griptrees
  • gr griptree remove <branch> - remove a griptree
  • gr griptree lock/unlock <branch> - protect griptrees from removal

Test plan

  • Build passes
  • All tests pass
  • Manual testing of griptree commands

Performance improvements:
- Parallelize push command using two-phase Promise.all approach
- Parallelize sync command to pull all repos concurrently
- Parallelize commit command using two-phase approach
- Add GitStatusCache class for caching git status calls

New feature - griptrees (worktree-based multi-branch workspaces):
- gr griptree add <branch> - create parallel workspace on a branch
- gr griptree list - show all griptrees
- gr griptree remove <branch> - remove a griptree
- gr griptree lock/unlock <branch> - protect griptrees from removal

Expected 3-5x speedup for workspaces with 5+ repos
- Remove unused imports: stat, getManifestsDir
- Extract findGriptreeByBranch() helper to reduce code duplication
- Simplify griptreeRemove, griptreeLock, griptreeUnlock functions
@laynepenney
laynepenney merged commit 40bebe6 into main Jan 29, 2026
4 checks passed
@laynepenney
laynepenney deleted the feat/perf-griptrees branch January 29, 2026 16:09
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.

1 participant