I recently got a new Retina MacBook Pro, with Mountain Lion. Unfortunately, emacs is taking forever to startup (around 5s) on my new computer. I tried installing the latest homebrew version of emacs, but the problem persists. I don't have a .emacs file, so I'm clueless as to what could be causing the slow startup.
What tools do I have at my disposal to debug where emacs is spending its time during startup?
It looks like you need to have a fully-qualified domain name for your computer's hostname (e.g., myretina.local
); otherwise, Emacs will be slow to start.
You can verify your hostname via Terminal with
hostname
and you can set it with
sudo scutil --set HostName myretina.local
For starters, run emacs -Q
(which will start Emacs with no start-up files at all), and see whether that's still slow.
You may wish to read over the following, which explains all the various possible files which Emacs will look for by default:
C-hig (emacs) Init File
RET
Changing hostname didn't do anything for me. What worked wonders for me seems counter intuitive, but now my emacs starts instantly from terminal. This is what I did
alias emacs=/Applications/Emacs.app/Contents/MacOS/Emacs --debug-init
However, it still takes a few seconds, sometime even 15 seconds, to start from the graphical interface. Weird!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With