Parallelize 17 commands for faster execution #191
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.
This PR implements parallel processing using Rayon to make commands significantly faster when running on multiple repositories simultaneously.
Critical commands (especially
gut template apply --abortandgut topic getwhich were very slow)gut template apply --abortgut template apply --continuegut template apply(start)gut topic getGitHub API commands
gut topic setgut topic addgut branch protectgut branch unprotectgut branch defaultgut set secretgut set infogut set team permissiongut hook creategut hook deletegut workflow runGit operations
gut checkoutgut topic applyAlready parallelized
gut status(already using rayon)gut apply(already using rayon)Changes
forloops to parallel.par_iter().for_each()use rayon::prelude::*;to all relevant filesBenefits
Rayon is already a dependency in the project, so this adds no new dependencies.
Build Instructions
Note: There is currently a known issue with OpenSSL building on macOS Sequoia (26.0) with Homebrew Perl 5.40. This error is not related to the changes in this PR.
Solution for building locally:
# Use system OpenSSL instead of vendored version OPENSSL_NO_VENDOR=1 cargo build --releaseAlternatively, set this in
.cargo/config.toml:The code is syntactically correct and has no errors. VS Code shows no issues, and
cargo checkwith OPENSSL_NO_VENDOR=1 passes without errors.