Browse Source
After profiling startup time, I found that "pyenv rehash" is by far the slowest piece. This change skips rehashing on init. See https://github.com/pyenv/pyenv/issues/784#issuecomment-404850327 Also pass the shell explicitly, as suggested in https://github.com/pyenv/pyenv/issues/784#issuecomment-404944318, which provides a modest improvement. In total, this improves startup time from 1s to 0.3s on my machine. Using the following command: python -m timeit "__import__('subprocess').Popen(['zsh', '-i', '-c', 'echo']).communicate()" Result before this change: 10 loops, best of 3: 1 sec per loop Result after this change: 10 loops, best of 3: 334 msec per loopmaster
Steven Loria
7 years ago
committed by
Indrajit Raychaudhuri
1 changed files with 3 additions and 3 deletions
Loading…
Reference in new issue