[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Speeding up Emacs load time
From: |
Hongxu Chen |
Subject: |
Re: Speeding up Emacs load time |
Date: |
Fri, 28 Jun 2013 13:27:36 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Bob Proulx <bob@proulx.com> writes:
> Andrew Pennebaker wrote:
>> I love Emacs's customizability! I regularly edit my .emacs file, and the
>> community has been helpful and encouraging. But I do notice that Emacs can
>> take several (10) seconds or longer to load.
>
> My .emacs used to take a while to load as well. But eventually I made
> an effort to speed it up and now it is sub-second.
>
>> For reference, I'm using Emacs 24.1 for Mac OS X, Windows, and Android. I
>> keep my .emacs synced, shared, and backed up on GitHub.
>> https://github.com/mcandre/dotfiles/blob/master/.emacs>
>> Could someone help me cut down the load time while maintaining the same
>> behavior?
>
> I looked at your .emacs file. It is rather extensive. Time consuming
> parts are usually anytime you (require 'foo) or (load "foo"). Do you
> really need all of those executed each and every time you start emacs?
> Probably not.
>
> Walk through every one of those in your .emacs file and make sure that
> they are placed within an appropriate (eval-after-load "foo" ...)
> wrapping like you have for the "grep" case so that they don't take
> place at load time but take place only when that particular feature is
> used. If there is confusion then pick one and ask about it. And then
> another. And continue until all of them are only loaded when that
> feature is used.
>
> When timing your startup time how long does it take to start emacs
> when not loading anything? When loading the system startup only?
>
> Timings from my system after much optimization.
>
> $ time emacs -f kill-emacs
> real 0m0.157s
> user 0m0.140s
> sys 0m0.012s
> $ time emacs -q -f kill-emacs
> real 0m0.137s
> user 0m0.116s
> sys 0m0.016s
> $ time emacs -Q -f kill-emacs
> real 0m0.051s
> user 0m0.028s
> sys 0m0.020s
Hey Bob, would you mind sharing your .emacs settings(pastebin/gist/github or
something like that)?
Thanks.
>
> Bob
--
Regards,
Hongxu Chen
Message not available