GNU bug report logs - #30731
Slower startup using March (27.0.50) build in windows

Previous Next

Package: emacs;

Reported by: Shuguang Sun <shuguang <at> gmail.com>

Date: Tue, 6 Mar 2018 16:21:02 UTC

Severity: normal

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Forwarded to https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00040.html

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30731 in the body.
You can then email your comments to 30731 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#30731; Package emacs. (Tue, 06 Mar 2018 16:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Shuguang Sun <shuguang <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 06 Mar 2018 16:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Slower startup using March (27.0.50) build in windows
Date: Wed, 7 Mar 2018 00:20:14 +0800
[Message part 1 (text/plain, inline)]
Hi,

I built emacs 27 on 4th March, however, the startup gets slower than the
build on 4th Feb (which is camparable with the build in
https://alpha.gnu.org/gnu/emacs/pretest/windows/emacs-27/).
I'm sorry I don't know how to repeat it using "-q".

System: Windows 7

The same .emacs file;

Here is the message from 4th Feb build (GNU Emacs 27.0.50 (build 6,
x86_64-w64-mingw32) of 2018-02-04):
>>> start load .emacs: 0.140 sec <<<
>>> before custom-set-variables : 0.359 sec <<<
Loading image-file...done
Loading time...done
Loading completion...done
Loading elec-pair...done
Loading icomplete...done
Loading ido...done
Loading avoid...done
Loading savehist...done
Loading paren...done
>>> custom-set-variables time: 2.248 sec <<<
>>> frame-setting time: 2.263 sec <<<
‘epa-file’ already enabled
epa-file loaded
elpa initialized
>>> elpa time: 4.464 sec <<<

Below is the message from 4th March build.
1. It has a warning at the very begining. If start with -q, there will be
no such warning.
2. Actually there is nothing before " >>> start load .emacs: 2.575 sec <<<
", however, it still takes 2.574 sec.
3. The load time is longer than the 4th Feb build.

Symbol's value as variable is void: Info-default-directory-list [14 times]
>>> start load .emacs: 2.575 sec <<<
>>> before custom-set-variables : 2.903 sec <<<
Loading image-file...done
Loading time...done
Loading completion...done
Loading elec-pair...done
Loading icomplete...done
Loading ido...done
Loading avoid...done
Loading savehist...done
Loading paren...done
>>> custom-set-variables time: 8.333 sec <<<
>>> frame-setting time: 8.333 sec <<<
‘epa-file’ already enabled
epa-file loaded
elpa initialized
>>> elpa time: 9.394 sec <<<

The value of Info-default-directory-list at the very begining is
("%emacs_dir%/share/info/").
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30731; Package emacs. (Fri, 09 Mar 2018 01:37:01 GMT) Full text and rfc822 format available.

Message #8 received at 30731 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: 30731 <at> debbugs.gnu.org
Subject: Re: bug#30731: Slower startup using March (27.0.50) build in windows
Date: Thu, 08 Mar 2018 20:35:54 -0500
Shuguang Sun <shuguang <at> gmail.com> writes:

> I built emacs 27 on 4th March, however, the startup gets slower than
> the build on 4th Feb (which is camparable with the build in https://
> alpha.gnu.org/gnu/emacs/pretest/windows/emacs-27/).
> I'm sorry I don't know how to repeat it using "-q".
>
> System: Windows 7

> Below is the message from 4th March build.
> 1. It has a warning at the very begining. If start with -q, there
> will be no such warning.
> 2. Actually there is nothing before " >>> start load .emacs: 2.575
> sec <<< ", however, it still takes 2.574 sec.
> 3. The load time is longer than the 4th Feb build.
>
> Symbol's value as variable is void: Info-default-directory-list [14
> times]

Could you try out the patch posted to emacs-devel?

https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00040.html




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30731; Package emacs. (Sun, 11 Mar 2018 03:26:01 GMT) Full text and rfc822 format available.

Message #11 received at 30731 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 30731 <at> debbugs.gnu.org
Subject: Re: bug#30731: Slower startup using March (27.0.50) build in windows
Date: Sun, 11 Mar 2018 11:25:13 +0800
[Message part 1 (text/plain, inline)]
I patched the startup.el and package.el in the installed emacs. They seems
not work. I'll try to patch the git source prior to the complilation later
when I get time.


1. Even I put the (setq package-enable-at-startup nil) in the top of the
.emacs, it takes 3.692 sec before loading others of the init file. I have a
site-start.el file, which is suposed to run before .emacs is loaded. Woud
it impact the the load process? NB. the 3.692 does not count the site-start
in. It is from
(message ">>> start load .emacs: %.3f sec <<<"
                     (float-time (time-subtract after-init-time
before-init-time)))

2. No mather whether I set package-enable-at-startup, it takes about 8 sec
to load the custom-set-variable. However, it takes only 2.5 sec in the Feb
version.

Symbol's value as variable is void: Info-default-directory-list [14 times]
>>> start load .emacs: 3.692 sec <<<
Loading Sun Shuguang’s .emacs file
>>> before custom-set-variables : 4.176 sec <<<
Loading image-file...done
Loading time...done
Loading completion...done
Loading elec-pair...done
Loading icomplete...done
Loading ido...done
Loading avoid...done
Loading savehist...done
Loading paren...done
>>> custom-set-variables time: 12.387 sec <<<


On Fri, Mar 9, 2018 at 9:35 AM, Noam Postavsky <npostavs <at> gmail.com> wrote:

> Shuguang Sun <shuguang <at> gmail.com> writes:
>
> > I built emacs 27 on 4th March, however, the startup gets slower than
> > the build on 4th Feb (which is camparable with the build in https://
> > alpha.gnu.org/gnu/emacs/pretest/windows/emacs-27/).
> > I'm sorry I don't know how to repeat it using "-q".
> >
> > System: Windows 7
>
> > Below is the message from 4th March build.
> > 1. It has a warning at the very begining. If start with -q, there
> > will be no such warning.
> > 2. Actually there is nothing before " >>> start load .emacs: 2.575
> > sec <<< ", however, it still takes 2.574 sec.
> > 3. The load time is longer than the 4th Feb build.
> >
> > Symbol's value as variable is void: Info-default-directory-list [14
> > times]
>
> Could you try out the patch posted to emacs-devel?
>
> https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00040.html
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30731; Package emacs. (Sun, 11 Mar 2018 17:22:02 GMT) Full text and rfc822 format available.

Message #14 received at 30731 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 30731 <at> debbugs.gnu.org
Subject: Re: bug#30731: Slower startup using March (27.0.50) build in windows
Date: Mon, 12 Mar 2018 01:21:50 +0800
[Message part 1 (text/plain, inline)]
 Hi Noam,

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?
2. Why custom-set-variable  get slower?
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)
and then packages customizations (hooks etc)
5) I don't have default.el or init.el

How could I adapt the change in package.el and startup.el? e.g. to disable
package initialization at the very begining but start it at some point of
the initialization of emacs.



On Sun, Mar 11, 2018 at 11:25 AM, Shuguang Sun <shuguang <at> gmail.com> wrote:

> I patched the startup.el and package.el in the installed emacs. They seems
> not work. I'll try to patch the git source prior to the complilation later
> when I get time.
>
>
> 1. Even I put the (setq package-enable-at-startup nil) in the top of the
> .emacs, it takes 3.692 sec before loading others of the init file. I have a
> site-start.el file, which is suposed to run before .emacs is loaded. Woud
> it impact the the load process? NB. the 3.692 does not count the site-start
> in. It is from
> (message ">>> start load .emacs: %.3f sec <<<"
>                      (float-time (time-subtract after-init-time
> before-init-time)))
>
> 2. No mather whether I set package-enable-at-startup, it takes about 8 sec
> to load the custom-set-variable. However, it takes only 2.5 sec in the Feb
> version.
>
> Symbol's value as variable is void: Info-default-directory-list [14 times]
> >>> start load .emacs: 3.692 sec <<<
> Loading Sun Shuguang’s .emacs file
> >>> before custom-set-variables : 4.176 sec <<<
> Loading image-file...done
> Loading time...done
> Loading completion...done
> Loading elec-pair...done
> Loading icomplete...done
> Loading ido...done
> Loading avoid...done
> Loading savehist...done
> Loading paren...done
> >>> custom-set-variables time: 12.387 sec <<<
>
>
> On Fri, Mar 9, 2018 at 9:35 AM, Noam Postavsky <npostavs <at> gmail.com> wrote:
>
>> Shuguang Sun <shuguang <at> gmail.com> writes:
>>
>> > I built emacs 27 on 4th March, however, the startup gets slower than
>> > the build on 4th Feb (which is camparable with the build in https://
>> > alpha.gnu.org/gnu/emacs/pretest/windows/emacs-27/).
>> > I'm sorry I don't know how to repeat it using "-q".
>> >
>> > System: Windows 7
>>
>> > Below is the message from 4th March build.
>> > 1. It has a warning at the very begining. If start with -q, there
>> > will be no such warning.
>> > 2. Actually there is nothing before " >>> start load .emacs: 2.575
>> > sec <<< ", however, it still takes 2.574 sec.
>> > 3. The load time is longer than the 4th Feb build.
>> >
>> > Symbol's value as variable is void: Info-default-directory-list [14
>> > times]
>>
>> Could you try out the patch posted to emacs-devel?
>>
>> https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00040.html
>>
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30731; Package emacs. (Sun, 11 Mar 2018 17:40:01 GMT) Full text and rfc822 format available.

Message #17 received at 30731 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: 30731 <at> debbugs.gnu.org
Subject: Re: bug#30731: Slower startup using March (27.0.50) build in windows
Date: Sun, 11 Mar 2018 13:39:11 -0400
Shuguang Sun <shuguang <at> gmail.com> 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').





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30731; Package emacs. (Mon, 12 Mar 2018 01:49:01 GMT) Full text and rfc822 format available.

Message #20 received at 30731 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 30731 <at> debbugs.gnu.org
Subject: Re: bug#30731: Slower startup using March (27.0.50) build in windows
Date: Mon, 12 Mar 2018 09:48:15 +0800
[Message part 1 (text/plain, inline)]
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 <npostavs <at> gmail.com> wrote:

> Shuguang Sun <shuguang <at> gmail.com> 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').
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30731; Package emacs. (Mon, 12 Mar 2018 01:53:02 GMT) Full text and rfc822 format available.

Message #23 received at 30731 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: 30731 <at> debbugs.gnu.org
Subject: Re: bug#30731: Slower startup using March (27.0.50) build in windows
Date: Sun, 11 Mar 2018 21:52:10 -0400
Shuguang Sun <shuguang <at> gmail.com> writes:

> 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.

Oh, interesting.  I guess the slowdown of the custom-set-variables must
have been caused by autoloads getting triggered then?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30731; Package emacs. (Mon, 12 Mar 2018 16:09:02 GMT) Full text and rfc822 format available.

Message #26 received at 30731 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 30731 <at> debbugs.gnu.org
Subject: Re: bug#30731: Slower startup using March (27.0.50) build in windows
Date: Tue, 13 Mar 2018 00:08:47 +0800
[Message part 1 (text/plain, inline)]
FYI. If put (package-initialize) before custom-set-variables,
>>> before custom-set-variables : 3.637 sec <<<
Loading image-file...done
Loading time...done
Loading completion...done
Loading elec-pair...done
Loading icomplete...done
Loading ido...done
Loading avoid...done
Loading savehist...done
Loading paren...done
>>> custom-set-variables time: 10.080 sec <<<

Don't know whether autoloads being triggered. It is hard to test one by one.




On Mon, Mar 12, 2018 at 9:52 AM, Noam Postavsky <npostavs <at> gmail.com> wrote:

> Shuguang Sun <shuguang <at> gmail.com> writes:
>
> > 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.
>
> Oh, interesting.  I guess the slowdown of the custom-set-variables must
> have been caused by autoloads getting triggered then?
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30731; Package emacs. (Mon, 12 Mar 2018 17:10:02 GMT) Full text and rfc822 format available.

Message #29 received at 30731 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: 30731 <at> debbugs.gnu.org
Subject: Re: bug#30731: Slower startup using March (27.0.50) build in windows
Date: Mon, 12 Mar 2018 13:09:13 -0400
On Mon, Mar 12, 2018 at 12:08 PM, Shuguang Sun <shuguang <at> gmail.com> wrote:
> FYI. If put (package-initialize) before custom-set-variables,
>>>> before custom-set-variables : 3.637 sec <<<
> Loading image-file...done
> Loading time...done
> Loading completion...done
> Loading elec-pair...done
> Loading icomplete...done
> Loading ido...done
> Loading avoid...done
> Loading savehist...done
> Loading paren...done
>>>> custom-set-variables time: 10.080 sec <<<
>
> Don't know whether autoloads being triggered. It is hard to test one by one.

Try

...
(require 'trace)
(trace-function 'do-after-load-evaluation)
(custom-set-variables ...)
(untrace-function 'do-after-load-evaluation)

and see if there is a difference in the *trace-output* buffer when you
call package-initialize first.

Maybe also do (mapc #'require '(image-file time completion elec-pair
ido avoid savehist paren)) to get the known loads (which I see listed
in your output above) out of the way.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30731; Package emacs. (Tue, 13 Mar 2018 10:41:02 GMT) Full text and rfc822 format available.

Message #32 received at 30731 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 30731 <at> debbugs.gnu.org
Subject: Re: bug#30731: Slower startup using March (27.0.50) build in windows
Date: Tue, 13 Mar 2018 18:34:16 +0800
[Message part 1 (text/plain, inline)]
Hi Noam,

Thanks for the tips. One (package-earlyload) is to put package-initialize
before custom-set-variables, another one (package-lateload) is to put
package-initialize after then custom-set-variables. I attahed the diff of
the trace-log.
The trace-log from package-earlyload has less do-after-load-evaluation
items which are supposed to be loaded during the package-initialize.
However, it still takes longer time for custom-set-variables  during early
package initialization.
The two items, mail-prsvr.elc and mm-util.elc are in earlyload but not in
lateload.



On Tue, Mar 13, 2018 at 1:09 AM, Noam Postavsky <npostavs <at> gmail.com> wrote:

> On Mon, Mar 12, 2018 at 12:08 PM, Shuguang Sun <shuguang <at> gmail.com> wrote:
> > FYI. If put (package-initialize) before custom-set-variables,
> >>>> before custom-set-variables : 3.637 sec <<<
> > Loading image-file...done
> > Loading time...done
> > Loading completion...done
> > Loading elec-pair...done
> > Loading icomplete...done
> > Loading ido...done
> > Loading avoid...done
> > Loading savehist...done
> > Loading paren...done
> >>>> custom-set-variables time: 10.080 sec <<<
> >
> > Don't know whether autoloads being triggered. It is hard to test one by
> one.
>
> Try
>
> ...
> (require 'trace)
> (trace-function 'do-after-load-evaluation)
> (custom-set-variables ...)
> (untrace-function 'do-after-load-evaluation)
>
> and see if there is a difference in the *trace-output* buffer when you
> call package-initialize first.
>
> Maybe also do (mapc #'require '(image-file time completion elec-pair
> ido avoid savehist paren)) to get the known loads (which I see listed
> in your output above) out of the way.
>
[Message part 2 (text/html, inline)]
[package-e-l.diff (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30731; Package emacs. (Wed, 14 Mar 2018 01:39:01 GMT) Full text and rfc822 format available.

Message #35 received at 30731 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: 30731 <at> debbugs.gnu.org
Subject: Re: bug#30731: Slower startup using March (27.0.50) build in windows
Date: Tue, 13 Mar 2018 21:38:41 -0400
Shuguang Sun <shuguang <at> gmail.com> writes:

> The trace-log from package-earlyload has less
> do-after-load-evaluation items which are supposed to be loaded during
> the package-initialize. However, it still takes longer time for
> custom-set-variables  during early package initialization.
> The two items, mail-prsvr.elc and mm-util.elc are in earlyload but
> not in lateload.

Hmm, somehow that was not so informative as I'd have hoped.  Maybe
measuring each setting individually would give more info, try this:

(require 'pcase)

(defmacro split-custom-set-variables (cset-form)
  (pcase cset-form
    (`(custom-set-variables . ,entries)
     `(progn
        ,@(mapcar
           (pcase-lambda (`(quote (,sym . ,args)))
             `(let ((t0 (current-time))
                    (tf nil))
                (custom-set-variables (quote (,sym . ,args)))
                (setq tf (current-time))
                (message "setting `%s': %.3fs" ',sym
                         (float-time (time-subtract tf t0)))))
           entries)))))

(split-custom-set-variables
 (custom-set-variables
  ...))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30731; Package emacs. (Wed, 14 Mar 2018 05:03:01 GMT) Full text and rfc822 format available.

Message #38 received at 30731 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 30731 <at> debbugs.gnu.org
Subject: Re: bug#30731: Slower startup using March (27.0.50) build in windows
Date: Wed, 14 Mar 2018 13:02:39 +0800
[Message part 1 (text/plain, inline)]
The diff files compares the loading time given package initialized early or
late. And I attached a list of packages I installed.

On Wed, Mar 14, 2018 at 9:38 AM, Noam Postavsky <npostavs <at> gmail.com> wrote:

> Shuguang Sun <shuguang <at> gmail.com> writes:
>
> > The trace-log from package-earlyload has less
> > do-after-load-evaluation items which are supposed to be loaded during
> > the package-initialize. However, it still takes longer time for
> > custom-set-variables  during early package initialization.
> > The two items, mail-prsvr.elc and mm-util.elc are in earlyload but
> > not in lateload.
>
> Hmm, somehow that was not so informative as I'd have hoped.  Maybe
> measuring each setting individually would give more info, try this:
>
> (require 'pcase)
>
> (defmacro split-custom-set-variables (cset-form)
>   (pcase cset-form
>     (`(custom-set-variables . ,entries)
>      `(progn
>         ,@(mapcar
>            (pcase-lambda (`(quote (,sym . ,args)))
>              `(let ((t0 (current-time))
>                     (tf nil))
>                 (custom-set-variables (quote (,sym . ,args)))
>                 (setq tf (current-time))
>                 (message "setting `%s': %.3fs" ',sym
>                          (float-time (time-subtract tf t0)))))
>            entries)))))
>
> (split-custom-set-variables
>  (custom-set-variables
>   ...))
>
>
[Message part 2 (text/html, inline)]
[pkg-list.txt (text/plain, attachment)]
[pkg-e-l.diff (application/octet-stream, attachment)]
[pkg-late.txt (text/plain, attachment)]

Set bug forwarded-to-address to 'https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00040.html'. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 19 Mar 2018 23:42:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 30731 <at> debbugs.gnu.org and Shuguang Sun <shuguang <at> gmail.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 19 Mar 2018 23:42:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30731; Package emacs. (Mon, 19 Mar 2018 23:42:03 GMT) Full text and rfc822 format available.

Message #45 received at 30731 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: 30731 <at> debbugs.gnu.org
Subject: Re: bug#30731: Slower startup using March (27.0.50) build in windows
Date: Mon, 19 Mar 2018 19:41:50 -0400
forwarded 30731 https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00040.html
close 30731
quit

Shuguang Sun <shuguang <at> gmail.com> writes:

> The diff files compares the loading time given package initialized
> early or late. And I attached a list of packages I installed.

The variables which take longer seem to have custom setters; those don't
activate when the library is not loaded.  So basically, I think this
difference is to be expected.

Since the patches mention in
https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00040.html
have now been merged, I think we can consider this bug resolved.

[1: 2db57579b0]: 2018-03-19 10:44:40 +0200
  Various follow-ups for early init file changes
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=2db57579b08ac99c464b6d3698648b3167fc5d55




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 17 Apr 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.