all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs startup suddenly slower
@ 2017-09-13 17:26 Sivaram Neelakantan
  2017-09-13 17:46 ` Drew Adams
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Sivaram Neelakantan @ 2017-09-13 17:26 UTC (permalink / raw)
  To: help-gnu-emacs

 I was tinkering with my .Emacs file and I don't know what happened
 but my Emacs startup has shot up to 83 secs compared to 4 to 7 secs
 earlier as checked by M-x Emacs-init-time.  This was done multiple
 times and time ranged from 45 to 85 secs

I installed benchmark that I got from github
https://github.com/dholm/benchmark-init-el and it gave the following 

 Module                                | Type   | ms [^] |total ms 
  ucs-normalize                         require    3219    3219
  auto-complete                         require    2188    3282
  default                               load       1610    1610
  c:/gnu/initfiles/.ido_config.el       load       1469    9907
  pcache                                require    1406    3579
  c:/gnu/initfiles/.cygwin_config.el    load       1391    3688
  flycheck                              require    1375    5794
  ...
  ess-site                              load        266   15767

The above is an elided list of big time spenders.  I was tinkering
with .Emacs and this is how I load them

(setq user-emacs-directory "c:/gnu/initfiles/.emacs.d/")
(require 'package)
(setq package-enable-at-startup nil)
(package-initialize)
(load-file "c:/gnu/initfiles/.emacs_new") ;; this calls the package
                                          ;; config files below

(load-file "c:/gnu/initfiles/.text_config.el")
(load-file "c:/gnu/initfiles/.ido_config.el")
(load-file "c:/gnu/initfiles/.ac_config.el")
(load-file "c:/gnu/initfiles/.r_ess_config.el")
(load-file "c:/gnu/initfiles/.cygwin_config.el")
(load-file "c:/gnu/initfiles/.uniq_config.el")
(load-file "c:/gnu/initfiles/.smex_config.el")

Not sure why this slowness that is affecting all buffers now as I can
see a noticable lag when typing or opening a dired file or buffer

sivaram
-- 





^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Emacs startup suddenly slower
  2017-09-13 17:26 Emacs startup suddenly slower Sivaram Neelakantan
@ 2017-09-13 17:46 ` Drew Adams
  2017-09-13 19:19 ` Eli Zaretskii
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Drew Adams @ 2017-09-13 17:46 UTC (permalink / raw)
  To: Sivaram Neelakantan, help-gnu-emacs

As nearly always for this kind of thing, recursively bisect your init file to find the culprit.

You can use command `comment-region' to comment a selection of code.  With prefix arg `C-u' it uncomments instead.

Comment out 1/2, then 3/4, 7/8, 15/16, etc. of your init file, to narrow down the problem.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Emacs startup suddenly slower
  2017-09-13 17:26 Emacs startup suddenly slower Sivaram Neelakantan
  2017-09-13 17:46 ` Drew Adams
@ 2017-09-13 19:19 ` Eli Zaretskii
  2017-09-13 19:43 ` Emanuel Berg
  2017-09-13 20:53 ` John Mastro
  3 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2017-09-13 19:19 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Sivaram Neelakantan <nsivaram.net@gmail.com>
> Date: Wed, 13 Sep 2017 22:56:51 +0530
> 
> Not sure why this slowness that is affecting all buffers now as I can
> see a noticable lag when typing or opening a dired file or buffer

Fire up "M-x profiler-start", then type for several seconds, then
produce the profile and see who is on the top.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Emacs startup suddenly slower
  2017-09-13 17:26 Emacs startup suddenly slower Sivaram Neelakantan
  2017-09-13 17:46 ` Drew Adams
  2017-09-13 19:19 ` Eli Zaretskii
@ 2017-09-13 19:43 ` Emanuel Berg
  2017-09-13 20:53 ` John Mastro
  3 siblings, 0 replies; 10+ messages in thread
From: Emanuel Berg @ 2017-09-13 19:43 UTC (permalink / raw)
  To: help-gnu-emacs

Sivaram Neelakantan wrote:

> I was tinkering with my .Emacs file and
> I don't know what happened but my Emacs
> startup has shot up to 83 secs compared to 4
> to 7 secs earlier as checked by M-x
> Emacs-init-time. This was done multiple times
> and time ranged from 45 to 85 secs

... 83s!?!

Well, instead of doing a quantitative
investigation you should look for the one
totally bizarre thing that screws it all up.
Like, what did you do right before it happened?

As Drew says, do the binary search unless you
can't spot it instantly, as you on the other
hand should be able to since it is most
definitely something very wierd indeed.

Don't forget to post what you did! Should be
very interesting. Could be champagne, LSD, or
VX gas all over :)

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Emacs startup suddenly slower
  2017-09-13 17:26 Emacs startup suddenly slower Sivaram Neelakantan
                   ` (2 preceding siblings ...)
  2017-09-13 19:43 ` Emanuel Berg
@ 2017-09-13 20:53 ` John Mastro
  2017-09-13 23:16   ` Emanuel Berg
  2017-09-14  2:56   ` Sivaram Neelakantan
  3 siblings, 2 replies; 10+ messages in thread
From: John Mastro @ 2017-09-13 20:53 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org; +Cc: Sivaram Neelakantan

Sivaram Neelakantan <nsivaram.net@gmail.com> wrote:
>  I was tinkering with my .Emacs file and I don't know what happened
>  but my Emacs startup has shot up to 83 secs compared to 4 to 7 secs
>  earlier as checked by M-x Emacs-init-time.  This was done multiple
>  times and time ranged from 45 to 85 secs

Not sure if this is relevant to your case, but at my job I use a Windows
machine with an antivirus product from Trend Micro. The antivirus
program increases Emacs's startup time with my configuration from 5
seconds to 60+ seconds - a huge increase. When profiled, almost all the
time is spent in `require' and `load'.

I suspect this is from its behavioral analysis features but I've tried
adding Emacs to its various exception lists without luck. The only thing
that restores the lower startup time is to completely kill the antivirus
program, which is unacceptable, so I just live with it.

        John



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Emacs startup suddenly slower
  2017-09-13 20:53 ` John Mastro
@ 2017-09-13 23:16   ` Emanuel Berg
  2017-09-16 19:23     ` John Mastro
  2017-09-14  2:56   ` Sivaram Neelakantan
  1 sibling, 1 reply; 10+ messages in thread
From: Emanuel Berg @ 2017-09-13 23:16 UTC (permalink / raw)
  To: help-gnu-emacs

John Mastro wrote:

> I suspect this is from its behavioral
> analysis features but I've tried adding Emacs
> to its various exception lists without luck.
> The only thing that restores the lower
> startup time is to completely kill the
> antivirus program, which is unacceptable, so
> I just live with it.

Startup time is also a bit irrelevant, even
83s, as typically what you'd do is simply turn
it (Emacs) on and then keep it running.
Uptime, remember?

PS. Why do you want to run an antivirus program
    each time you start Emacs? Is that a new
    vulnerable interface where the crackers
    lay their attentions?

PPS. Here are my times executing the following
     command. N.B. that is the Unix shell tool
     time(1), available in the repos, and not
     the 'time' of a shell like bash or zsh.

     With customization and extention:

         /usr/bin/time --format=%es --output=times.txt --append emacs -eval '(save-buffers-kill-terminal t)'

         13.07s

     Without it, the -Q option:

         /usr/bin/time --format=%es --output=times.txt --append emacs -eval '(save-buffers-kill-terminal t)'
    
         0.23s

     But those 12.84s have no meaning.
     I've "lost" considerably more time doing
     those tests and writing this post.


         love and pain             /
         it never stays the same   /
         or is it just a game      /
         a life with love and pain
         
         (Captain Hollywood Project,
                               1996)


-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Emacs startup suddenly slower
  2017-09-13 20:53 ` John Mastro
  2017-09-13 23:16   ` Emanuel Berg
@ 2017-09-14  2:56   ` Sivaram Neelakantan
  1 sibling, 0 replies; 10+ messages in thread
From: Sivaram Neelakantan @ 2017-09-14  2:56 UTC (permalink / raw)
  To: help-gnu-emacs

On Wed, Sep 13 2017,John Mastro wrote:

> Sivaram Neelakantan <nsivaram.net@gmail.com> wrote:
>>  I was tinkering with my .Emacs file and I don't know what happened
>>  but my Emacs startup has shot up to 83 secs compared to 4 to 7 secs
>>  earlier as checked by M-x Emacs-init-time.  This was done multiple
>>  times and time ranged from 45 to 85 secs
>
> Not sure if this is relevant to your case, but at my job I use a Windows
> machine with an antivirus product from Trend Micro. The antivirus
> program increases Emacs's startup time with my configuration from 5
> seconds to 60+ seconds - a huge increase. When profiled, almost all the
> time is spent in `require' and `load'.

[snipped 9 lines]

This.  I'm on Windows 10 and I just rebooted the machine and it went
through a 45m patch update and now Emacs behaves correctly.  I've got
the startup back to 4 to 7 secs.  Not tracked it down to antivirus
issue though.

Apparently, patches are downloaded and applied without any user
notifications; so the sudden slowness is disconcerting when you know
the changes you made were trivial and should not affect in any way.

tldr: the infamous reboot and it goes away worked.

Apologies for the noise. 

sivaram
-- 




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Emacs startup suddenly slower
  2017-09-13 23:16   ` Emanuel Berg
@ 2017-09-16 19:23     ` John Mastro
  2017-09-16 20:48       ` Emanuel Berg
  0 siblings, 1 reply; 10+ messages in thread
From: John Mastro @ 2017-09-16 19:23 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Emanuel Berg wrote:
> Startup time is also a bit irrelevant, even
> 83s, as typically what you'd do is simply turn
> it (Emacs) on and then keep it running.
> Uptime, remember?
>
> PS. Why do you want to run an antivirus program
>     each time you start Emacs? Is that a new
>     vulnerable interface where the crackers
>     lay their attentions?

That's not really how it works. Rather than a user initiating a virus
scan at specific times, it's always running in the background,
analyzing program behavior for signs that a process may be malicious
(among other things).

The idea is that this may let it catch, for instance, some new
ransomware variant based purely on the fact that it's doing
ransomware-like things, without needing a specific "signature" to
identify it.

[ Note: I'm no expert on antivirus techniques or implementations, this
  is just my casual understanding ]

        John



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Emacs startup suddenly slower
  2017-09-16 19:23     ` John Mastro
@ 2017-09-16 20:48       ` Emanuel Berg
  0 siblings, 0 replies; 10+ messages in thread
From: Emanuel Berg @ 2017-09-16 20:48 UTC (permalink / raw)
  To: help-gnu-emacs

John Mastro wrote:

>> PS. Why do you want to run an antivirus
>> program each time you start Emacs? Is that
>> a new vulnerable interface where the
>> crackers lay their attentions?
>
> That's not really how it works. Rather than
> a user initiating a virus scan at specific
> times, it's always running in the background,
> analyzing program behavior for signs that
> a process may be malicious (among other
> things).
>
> The idea is that this may let it catch, for
> instance, some new ransomware variant based
> purely on the fact that it's doing
> ransomware-like things, without needing
> a specific "signature" to identify it.

Isn't there an antivirus Emacs package or ditto
GNU/Linux tool?

Because in all my years doing this I never paid
it any attention, so there is no telling what
mayhem the crackers have been up to right up my
back yard!


    ~"... an anarchist circus, travelling from
      summit to summit, with the sole purpose
      of creating as much mayhem as possible."
                                  (Tony Blair,
          after the the 2001 Gothenburg riots)


-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Emacs startup suddenly slower
@ 2017-09-18  8:01 Richard Melville
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Melville @ 2017-09-18  8:01 UTC (permalink / raw)
  To: help-gnu-emacs

On 16 September 2017 at 21:48, Emanuel Berg <moasen@zoho.com> wrote:

> John Mastro wrote:
>
> >> PS. Why do you want to run an antivirus
> >> program each time you start Emacs? Is that
> >> a new vulnerable interface where the
> >> crackers lay their attentions?
> >
> > That's not really how it works. Rather than
> > a user initiating a virus scan at specific
> > times, it's always running in the background,
> > analyzing program behavior for signs that
> > a process may be malicious (among other
> > things).
> >
> > The idea is that this may let it catch, for
> > instance, some new ransomware variant based
> > purely on the fact that it's doing
> > ransomware-like things, without needing
> > a specific "signature" to identify it.
>
> Isn't there an antivirus Emacs package or ditto
> GNU/Linux tool?
>
> Because in all my years doing this I never paid
> it any attention, so there is no telling what
> mayhem the crackers have been up to right up my
> back yard!
>
>
>     ~"... an anarchist circus, travelling from
>       summit to summit, with the sole purpose
>       of creating as much mayhem as possible."
>                                   (Tony Blair,
>           after the the 2001 Gothenburg riots)
>

I'm not sure what the purpose is of the quote, but as far as I'm concerned
(and many others) Tony Blair, and all his cohorts, should be in jail.

Richard


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-09-18  8:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-13 17:26 Emacs startup suddenly slower Sivaram Neelakantan
2017-09-13 17:46 ` Drew Adams
2017-09-13 19:19 ` Eli Zaretskii
2017-09-13 19:43 ` Emanuel Berg
2017-09-13 20:53 ` John Mastro
2017-09-13 23:16   ` Emanuel Berg
2017-09-16 19:23     ` John Mastro
2017-09-16 20:48       ` Emanuel Berg
2017-09-14  2:56   ` Sivaram Neelakantan
  -- strict thread matches above, loose matches on Subject: below --
2017-09-18  8:01 Richard Melville

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.