Search code examples
macosemacsosx-mountain-lion

How can I debug emacs' slow startup time?


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?


Solution

  • 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