Skip to content

perf: optimize worktree entry latency#14

Merged
wasabeef merged 2 commits intomainfrom
perf/worktree-entry-latency
Apr 12, 2026
Merged

perf: optimize worktree entry latency#14
wasabeef merged 2 commits intomainfrom
perf/worktree-entry-latency

Conversation

@wasabeef
Copy link
Copy Markdown
Owner

Summary

  • avoid full worktree status scans for create by introducing has_linked_worktrees
  • add BasicWorktreeInfo and use list_worktrees_basic for batch delete, rename, switch, and search
  • preserve existing behavior with regression tests for first-worktree prompts, renamed worktree identity, candidate ordering, and switch path handling

Validation

  • cargo fmt --check
  • cargo clippy --all-features -- -D warnings
  • cargo test --all-features -- --test-threads=1

@github-actions
Copy link
Copy Markdown

Code Metrics Report

Coverage Test Execution Time
68.6% 2m15s

Code coverage of files in pull request scope (71.7%)

Files Coverage
src/infrastructure/git.rs 72.4%
src/usecases/create_worktree.rs 70.9%
src/usecases/delete_worktree.rs 59.4%
src/usecases/rename_worktree.rs 84.6%
src/usecases/search_worktrees.rs 47.0%
src/usecases/switch_worktree.rs 90.4%

Reported by octocov

@wasabeef wasabeef merged commit cd627e5 into main Apr 12, 2026
6 checks passed
@wasabeef wasabeef deleted the perf/worktree-entry-latency branch April 12, 2026 12:58
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