Skip to content
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

speedup bash completion loading suggestion in docs #6105

Merged
merged 1 commit into from
May 7, 2019

Commits on May 7, 2019

  1. speedup bash completion loading suggestion in docs

    The current suggestion for users shells out to `brew --prefix` three separate times, which has a non-zero overhead (as per quick benchmark below, approx 20ms per invocation). By making a minor change, the first invocation can be stored in a local variable to reduce shell startup time.
    
    ```
    $ hyperfine --warmup=3 'brew --prefix'       
    Benchmark Homebrew#1: brew --prefix
      Time (mean ± σ):      21.3 ms ±   1.5 ms    [User: 8.8 ms, System: 10.6 ms]
      Range (min … max):    20.3 ms …  37.0 ms    128 runs
    ```
    mroth committed May 7, 2019
    Configuration menu
    Copy the full SHA
    dc30e9f View commit details
    Browse the repository at this point in the history