pyenv-virtualenv icon indicating copy to clipboard operation
pyenv-virtualenv copied to clipboard

eval "$(pyenv virtualenv-init -)" super slow on MacOS Big Sur

Open EmilStenstrom opened this issue 5 years ago • 3 comments

Hi,

After installing the public beta of Big Sur every command I type in the terminal takes 2-3 seconds before completing. I've troubleshot it to be because of the eval "$(pyenv virtualenv-init -)" line in my bash_profile. There's something in Big Sur that makes that command super slow.

Would you mind giving a couple of hints of where I should start looking for a resolution to this? Having ls take 2-3 seconds has already started to make me crazy :)

EmilStenstrom avatar Aug 14 '20 22:08 EmilStenstrom

I have slow performance on Catalina during bash login startup. It got a bit better when I upgraded to Bash 5.x (with homebrew). It still takes 0.42 to run the eval $(pyenv virtualenv-init -) in my .bashrc.

ngaloppo avatar Sep 17 '20 07:09 ngaloppo

Just to add that I have also started seeing this with Mojave using ZSH.

mrlesmithjr avatar Oct 02 '20 12:10 mrlesmithjr

this has been an ongoing issue, i ran into this problem several months back, and i use fish shell. i can't remember what it was that i did to "resolve" the issue. but i'm sure this isn't the first time this has been reported. i'll check my dotfiles real quick and see what i can gather because i know first hand how annoying this is.

https://github.com/ipatch/dotfiles/blob/95deca3516b4e00acd4219a9e191d275849663c0/config/fish/interactive/load_pyenv.fish#L17

digging through my dotfiles, it appears to be something related to the rehashing algo, but don't hold me to that.

ipatch avatar Nov 11 '20 17:11 ipatch

This is not specific to fish. Possible duplicate of #259

furudean avatar Apr 20 '23 19:04 furudean