mirror of
https://github.com/pyenv/pyenv.git
synced 2026-09-10 23:56:17 -04:00
This greatly improves the performance of `pyenv virtualenvwrapper_lazy`,
which happens to call pyenv-which a lot.
For profiling I've initially used:
% zmodload zsh/zprof
% eval "$(pyenv init -)"
% pyenv virtualenvwrapper_lazy
Before:
% zprof|grep -E '(pyenv|virtualenv)'
1) 1 754,07 754,07 58,95% 751,50 751,50 58,75% pyenv
21) 1 2,57 2,57 0,20% 2,57 2,57 0,20% virtualenvwrapper_setup_lazy_loader
1) 1 754,07 754,07 58,95% 751,50 751,50 58,75% pyenv
1/1 2,57 2,57 0,20% 2,57 2,57 virtualenvwrapper_setup_lazy_loader [21]
1/1 2,57 2,57 0,20% 2,57 2,57 pyenv [1]
21) 1 2,57 2,57 0,20% 2,57 2,57 0,20% virtualenvwrapper_setup_lazy_loader
After:
% zprof|grep -E '(pyenv|virtualenv)'
1) 1 383,30 383,30 27,97% 380,88 380,88 27,79% pyenv
31) 1 2,42 2,42 0,18% 2,42 2,42 0,18% virtualenvwrapper_setup_lazy_loader
1) 1 383,30 383,30 27,97% 380,88 380,88 27,79% pyenv
1/1 2,42 2,42 0,18% 2,42 2,42 virtualenvwrapper_setup_lazy_loader [31]
1/1 2,42 2,42 0,18% 2,42 2,42 pyenv [1]
31) 1 2,42 2,42 0,18% 2,42 2,42 0,18% virtualenvwrapper_setup_lazy_loader
Fixes https://github.com/yyuu/pyenv-virtualenvwrapper/issues/13
|
||
|---|---|---|
| .. | ||
| pyenv | ||
| pyenv---version | ||
| pyenv-commands | ||
| pyenv-completions | ||
| pyenv-exec | ||
| pyenv-global | ||
| pyenv-help | ||
| pyenv-hooks | ||
| pyenv-init | ||
| pyenv-local | ||
| pyenv-prefix | ||
| pyenv-rehash | ||
| pyenv-root | ||
| pyenv-sh-rehash | ||
| pyenv-sh-shell | ||
| pyenv-shims | ||
| pyenv-version | ||
| pyenv-version-file | ||
| pyenv-version-file-read | ||
| pyenv-version-file-write | ||
| pyenv-version-name | ||
| pyenv-version-origin | ||
| pyenv-versions | ||
| pyenv-whence | ||
| pyenv-which | ||