help-gnu-emacs
[Top][All Lists]
Advanced

[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: Wed, 26 Jun 2013 10:02:53 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Andrew Pennebaker <andrew.pennebaker@gmail.com> writes:

> 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.
It's odd that with so many "add-hook" and "autoload" the startup time is
still not that short. I guess you need a load time profiler like
`ProfileDotEmacs'(http://www.emacswiki.org/emacs/ProfileDotEmacs) and
find out what eats up the time.
>
> 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?
Some advice:
1. use compiled elisp(elc), however there seems no problem since you are
using `package', who does compile the script files he manages.
2. try separate some of the script(those you won't need until you use
the feature) from ~/.emacs(or ~/.init.el) and put them into special
files and try to use more "eval-after-load", "autoload", "add-hook"(be
careful for the buffer-local/global variable settings and choose the
right function of the three)
3. add (server-start) at the end of ~/.emacs and run emacsclient next
time you need emacs. For my understanding, running `emacsclient -t -a
""' at the beginning would slow down the startup time for the first
time.
4. It's not a problem when the startup time is not satisfactory since
you only need to open emacs once and you stay in it until you shutdown
your computer(IIRR, there is a midnight script support that there is no
need at all to close Emacs at all since it would do the cleanup work
automatically).

-- 
Regards,
Hongxu Chen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]