Hi Noam, Thank you for your patient explaination. I put the (setq package-enable-at-startup nil) in the early-init.el and the load time of .emacs is the same to the emacs Feb version. On Mon, Mar 12, 2018 at 1:39 AM, Noam Postavsky wrote: > Shuguang Sun writes: > > > I read the disussions and patches, and I find out the 3.692 sec at > > the beigining seems package initialization (according to the patch in > > Feb 17). > > However, I still don't get > > 1. What is an early init file? > > It should be explained in `(emacs) Early Init File' and `(elisp) Init > File'. > > > 2. Why custom-set-variable get slower? > > Not sure, we need to see some more detail to find out. Can you figure > out if it's all variables getting slower, or is there some specific > variable setting that causes the slowdown? > > > 3. If i want to disable package initialization prior to any thin in > > the .emacs, but after custom-set-variable and some environment > > variables setting (e.g. PATH, exec-path), how to do it? > > > > Could you help provide an example using my situation? > > 1) I use a Windows 7 box, and have HOME env variables, and .emacs.d > > folder under it > > 2) I have a site-start.el for environment variables setting (e.g. > > PATH, exec-path) <= I thinks this it not critical because it has no > > speed effect after I delete the site-start.el > > 3) I have .emacs under HOME, and compile it to .emacs.elc to speed it > > up > > 4) I load dired.el and then custom-set-variable, then some frame > > settings , then initialize package using > > (setq package-enable-at-startup nil) > > (package-initialize) > > The package-enable-at-startup setting should be moved to > ~/.emacs.d/early-init.el. > > Possibly also the settings in site-start.el (since the early-init.el > runs before site-start.el, as described in `(elisp) Startup Summary'). > >