Homebrew slows my terminal down on startup

1

I've had some issues with my terminal being extremely slow while starting up (both new windows and new tabs), from 10 seconds and up. I've tried deleting the Apple System Logs, but it doesn't help.

Today I hit Ctrl+C while it was starting and the following was output:

/usr/local/Library/Homebrew/global.rb:65:in ``': Interrupt
from /usr/local/Library/Homebrew/global.rb:65
from /usr/local/bin/brew:10:in `require'
from /usr/local/bin/brew:10

This obviously makes me think homebrew is doing something fishy that makes things slow down. I get the same message whenever I hit Ctrl+C during startup, whether it's after 1 second or 14, so I'm assuming it's the same process that's running for the whole time.

My google searches on this issue came up empty, so I'm throwing it out there and hoping for the best.

Does anyone know how to remedy this?

Oskar Eriksson

Posted 2012-09-18T11:33:45.477

Reputation: 131

The great question would be why homebrew gets started with terminal in first place. – bdecaf – 2012-09-18T11:59:11.753

Start Terminal, enter cd;open .profile you will get (hopefully) the TextEdit.app, add set -x to the top of the file. Save and open an new Terminal window - you will get what is bash doing at the startup... – kobame – 2012-09-18T12:06:16.930

I've added "set -x" to my .profile, but I can't see anything different when I'm starting my terminal. – Oskar Eriksson – 2012-09-18T21:02:46.943

Answers

2

Finally figured it out. My .bash_profile had about 100 lines like this one:

source "`brew --prefix grc`/etc/grc.bashrc"

I removed all but one and it's fast and snappy again.

Oskar Eriksson

Posted 2012-09-18T11:33:45.477

Reputation: 131

0

Make sure you do not have this line in you bash profile

echo 'source "`brew --prefix grc`/etc/grc.bashrc"' >> ~/.bash_profile

It adds that line every time you open a terminal window.

Snapper67

Posted 2012-09-18T11:33:45.477

Reputation: 1