zsh の起動の遅さに絶望して色々とゴソゴソ
単刀直入に。
before ~/.zshrc :
export PATH="$PATH:$(brew --prefix coreutils)/libexec/gnubin"
export CFLAGS="-I$(brew --prefix readline)/include -I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include"
export LDFLAGS="-L$(brew --prefix readline)/lib -L$(brew --prefix openssl)/lib"
この3行が活きていた頃、
$ time ( zsh -i -c exit )
( zsh -i -c exit; ) 3.62s user 2.59s system 44% cpu 14.076 total
$
after ~/.zshrc:
こう書き換えて計測
#export PATH="$PATH:$(brew --prefix coreutils)/libexec/gnubin"
export PATH="$PATH:/usr/local/opt/coreutils/libexec/gnubin"
#export CFLAGS="-I$(brew --prefix readline)/include -I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include"
export CFLAGS="-I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include"
#export LDFLAGS="-L$(brew --prefix readline)/lib -L$(brew --prefix openssl)/lib"
export LDFLAGS="-L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib"
$ time ( zsh -i -c exit )
( zsh -i -c exit; ) 0.17s user 0.24s system 22% cpu 1.821 total
$
驚愕。
検索ヒット用に、zsh 起動 遅い 改善 brew を書いておきます。
Author And Source
この問題について(zsh の起動の遅さに絶望して色々とゴソゴソ), 我々は、より多くの情報をここで見つけました https://qiita.com/akinoriikeda/items/6a098c8093a673fd06a1著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .