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: J. David Boyd
Subject: Re: Speeding up Emacs load time
Date: Wed, 24 Jul 2013 17:22:45 -0400
User-agent: Gnus/5.1299999999999999 (Gnus v5.13) Emacs/24.3 (cygwin)

"Sebastien Vauban" <sva-news@mygooglest.com> writes:

> Hi Glyn and all,
>
> Glyn Millington wrote:
>> One popular technique is not to load packages until you need 'em. That means
>> fewer 'requires' in your .emacs/init.el file and more autoloads.
>>
>> See tips 3-5 here!
>>
>> http://a-nickels-worth.blogspot.co.uk/2007/11/effective-emacs.html
>>
>> The key function is eval-after-load
>
> I'm using GNU Emacs on Windows, and using the above, I could reduce my load
> time from 10+ seconds to 3 seconds. Still 3 x over many of you, which report
> sub-seconds load time.
>
> Though, I'm a bit blocked. I don't understand how to do better, or how to
> completely avoid all the require commands.
>
> Just take a few exemple:
>
> - `(server-start)' takes more than 200 ms to run [1]; just that one command.
>   Though, I must have it in my .emacs file, right?
>
> - diff-mode-.el must be loaded before diff-mode; hence, I must have it at
>   startup.
>
> - Helm is my tool for opening files or switching between buffers. Just
>   requiring `helm-config' (almost only autoloads) -- hence, NOT `helm' (which
>   is more hungry in time) -- already takes 160 ms (as it still requires
>   `easy-menu' and `helm-aliases').
>
> - `diary-lib' and co (needed for appointments notification) takes 233 ms.
>   Shouldn't I be notified at startup of events occurring in less than 15
>   minutes, without having to make a first call to calendar or so?
>
> - `mic-paren' takes just 32 ms, but for just one small package, for which I
>   don't have a particular trigger. Is it `find-file-hook'?  Then, I won't have
>   parenthesis highlighted when directly typing text in a newly created buffer
>   (or in the scratch). So, I need it in my .emacs. It's not eval'ed-after-load
>   of something else.
>
> - The same for YASnippet (loaded in 130 ms): what would be the trigger?
>   Unless I have a clear one, I must require it in my .emacs file.
>
> - Once again, the same with `recentf', which takes 92 ms. Don't I have to load
>   it right at startup?
>
> These are a couple of examples which take a lot of the time, and for which I
> don't see a specific trigger that would allow me to defer their load to later.
>
> Any comments?
>
> Best regards,
>   Seb
>
> [1] The above are times on a very recent laptop i7, when on mains. Multiply
>     times by 3.5 when on battery.


Are you using Cygwin?  And the X11 binary, or the Ming-W binary?




reply via email to

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