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

Do not rely on /usr/bin/env in critical paths #1483

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 20, 2023

  1. Do not rely on /usr/bin/env in critical paths

    rbenv uses a lot of sub shell script calls, and `#!/usr/bin/env bash` is
    executed each time. This is not very efficient depending on the PATH
    settings.
    
    This changeset is to use `$BASH rbenv-*` when calling `rbenv-*` in
    critical paths to invoke ruby. This eliminates the overhead of calling
    `/usr/bin/env`.
    
    Before:
    ```
    $ time ruby -v
    ruby 3.3.0dev (2023-02-20T01:33:06Z master 7d5794bad5) [x86_64-linux]
    
    real    0m0.532s
    user    0m0.022s
    sys     0m0.087s
    ```
    
    After:
    ```
    $ time ruby -v
    ruby 3.3.0dev (2023-02-20T01:33:06Z master 7d5794bad5) [x86_64-linux]
    
    real    0m0.204s
    user    0m0.018s
    sys     0m0.028s
    ```
    mame committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    66a003c View commit details
    Browse the repository at this point in the history