2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

zsh の起動の遅さに絶望して色々とゴソゴソ

Last updated at Posted at 2019-03-18

単刀直入に。

before ~/.zshrc :

.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:

こう書き換えて計測

.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 を書いておきます。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?