This slows me down. Consider deferring expensive operations in virtualenvwrapper.sh to minimize the setup time.
# Repro Steps
time bash -l -i -c 'exit'
If you run the above line when commenting out vs. leaving in the 'source [...]/virtualenvwrapper.sh' inside .bashrc, the timing can increase as much as 900ms (but typically something closer to 200ms).
# Workaround
Defer import of virtualenvwrapper until it is used. This avoids the setup time overhead on the many shells that don't use virtualenvwrapper. Here is an example of what you could add to .bashrc to accomplish this:
# virtualenvwrapper
venv_init () {
export VIRTUALENVWRAPPER_PYTHON=`which python`
export WORKON_HOME=/Users/davidf/Projects/.virtualenvs
source /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh
}
# (Lazily import virtualenvwrapper for common commands, since it takes 200ms+ to import)
mkvirtualenv () { venv_init; mkvirtualenv $@; }
lsvirtualenv () { venv_init; lsvirtualenv $@; }
showvirtualenv () { venv_init; showvirtualenv $@; }
rmvirtualenv () { venv_init; rmvirtualenv $@; }
workon () { venv_init; workon $@; }
deactivate () { venv_init; deactivate $@; }