-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up brew tap
for no arguments
#18402
Conversation
This provides a >3x speedup for `brew tap` with no arguments (i.e., when listing taps). It also makes the completion significantly faster. $ hyperfine --warmup=3 --setup 'git checkout {branch}' --parameter-list branch master,brew-tap-speedup 'brew tap' Benchmark 1: brew tap (branch = master) Time (mean ± σ): 1.405 s ± 0.080 s [User: 0.561 s, System: 0.238 s] Range (min … max): 1.332 s … 1.549 s 10 runs Benchmark 2: brew tap (branch = brew-tap-speedup) Time (mean ± σ): 404.1 ms ± 124.8 ms [User: 107.9 ms, System: 200.7 ms] Range (min … max): 308.8 ms … 693.7 ms 10 runs Summary brew tap (branch = brew-tap-speedup) ran 3.48 ± 1.09 times faster than brew tap (branch = master)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
Co-authored-by: Carlo Cabrera <[email protected]>
Co-authored-by: Carlo Cabrera <[email protected]>
0fa31b4
to
e9b158c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea, thanks @ZhongRuoyu! A few more tweaks and then should be good to go.
Co-authored-by: Mike McQuaid <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonderful, thanks @ZhongRuoyu!
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?This provides a >3x speedup for
brew tap
with no arguments (i.e., when listing taps). It also makes the completion significantly faster.