Skip to content

Remove shebang lines from bin/ scripts for performance #261

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

Closed
wants to merge 1 commit into from

Conversation

cmcginty
Copy link

@cmcginty cmcginty commented May 1, 2018

All scripts in bin/ are called through pyenv therefore the shebang
lines are not necessary. On some systems this provides a measurable
increase in performance of the shell prompt.

Fixes #259

On my system this removes 400ms of run time from the pyenv sh-activate
command.

All scripts in bin/ are called through `pyenv` therefore the shebang
lines are not necessary. On some systems this provides a measurable
increase in performance of the shell prompt.

Fixes pyenv#259
@blueyed
Copy link
Collaborator

blueyed commented Jul 13, 2018

As per pyenv/pyenv#1153 (comment) I still think this is not really necessary.

@cmcginty can you provide timing information via python -m timeit "__import__('subprocess').Popen(['pyenv', 'sh-activate']).communicate()" (and other commands) with and without this change?

If this is a workaround for carbonblack etc, it might still make sense to merge it.
But in general pyenv/pyenv#357 would be better then.
It would also be good to get this into rbenv/pyenv first, to not spread the discussion everywhere.

@doron-cohen
Copy link

Hi, This is not only for carbon black users. I removed pyenv init from my profile because it is very slow and takes ~600ms to load the prompt which is an very annoying.
this fix helps in my case too and I have no antivirus on my machine

@native-api
Copy link
Member

This would break Fish as per pyenv/pyenv#1337

@native-api native-api closed this Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow shell performance after running pyenv virtualenv-init
4 participants