首页 > 解决方案 > Terminal commands running extremely slow

问题描述

I am currently having an issue where certain terminal commands are running extremely slowly.

Some example commands include: kubectl or brew

Currently time kubectl version takes 14s and time brew -v takes around 44s.

I've looked at other threads and they said to check what $PATH is set to, and it seems like mine is set correctly already:

echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Users/hardy/.fzf/bin

I have also tested with set -x to see exactly what is the delay. When I run kubectl or brew with set -x on, I am able to see that it stalls for an extremely long period of time after the command is run. It stalls for about 40s here:

brew -v
 + brew -v

Both brew and kubectl are located in /usr/local/bin. There are other commands that are located in /usr/local/bin that are not running extremely slow. Just a select few are running slow I believe.

Do you guys have any idea what the issue is or how to further debug this?

标签: performanceterminalcommandhomebrewkubectl

解决方案


推荐阅读