Repository navigation
feat(select): add 500ms timeout for git commands to improve TUI responsiveness - #484
Merged
Merged
Conversation
…nsiveness On large repos with many branches, `wt select` was slow because git operations (merge-tree, rev-list, diff) can take 400-1800ms each. This adds a thread-local command timeout that kills git commands exceeding 500ms. Architecture: - Thread-local `COMMAND_TIMEOUT` in shell_exec.rs, checked by `run()` - `set_command_timeout()` called per-worker in Rayon's thread pool - Repository and TaskContext stay clean (no timeout fields) - `wt list` passes None (no timeout), `wt select` passes 500ms Closes #461 Co-Authored-By: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
shell_exec::run()for killing slow git commandswt selectuses 500ms timeout to show TUI faster on large repos with many brancheswt listcontinues to wait for all data (no timeout)Addresses performance issues on repos with 100+ branches where git operations (merge-tree, rev-list, diff) can take 400-1800ms each.
Architecture: Thread-local timeout set per-worker in Rayon's thread pool. Repository and TaskContext stay clean - timeout is purely a runner concern.
Test plan
test_run_with_timeout_*)Closes #461
🤖 Generated with Claude Code