Loading Emacs Faster

Eric Cole has an interesting post on decreasing the Emacs load time. This is not something I’ve ever worried about because I tend to load it once when the machine boots and just keep it running. It makes no difference to me if it loads in 1 second or 10.

Cole looks at two strategies. The first is essentially what I do except he runs Emacs as a demon that gets started at boot time by systemd. I could do that too but I don’t bother. I just start it when my OS X desktop comes up.

The second approach is to profile Emacs’ startup, identify the hot spots, and do something to eliminate those hot spots. He does his profiling with profile-dotemacs. You can check his post for how he dealt with some of the startup time eaters.

As Cole says, lots of people enjoy spending hours to shave half a second off their load time. He even remarks that it helped him learn Emacs and become more efficient with it but worrying about load time always strikes me as fundamentally wrong-headed. If you’re worried about how long Emacs takes to load—assuming here that you don’t have some misconfiguration that makes it take a minute or more—then you’re probably importing habits you learned from another editor.

When I used Vim, I just started it every time I needed to edit something. It loaded almost instantaneously so there was no downside to that strategy. Experienced Emacsers tend to leave Emacs running and just pop open another buffer when they have something new to edit. As I say, who cares if it takes 10 seconds instead of 1 second to start? You hardly ever start it.

Still, if you enjoy fiddling with your init.el trying to wring out every unnecessary cycle, Cole’s post may give you some ideas.

This entry was posted in General and tagged . Bookmark the permalink.