all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs Slowdown
@ 2015-03-09 11:48 Phillip Lord
  2015-03-09 16:16 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Phillip Lord @ 2015-03-09 11:48 UTC (permalink / raw)
  To: help-gnu-emacs



I am suffering a rather disasterous slowdown in my emacs. It feels like
a memory leak, as my emacs gets slower over time. It mostly seems to be
affected auctex, where there is considerable lag in cursor movement to
the point that typing becomes difficult.

I've tried the profiler. After a long run, I find this for memory usage:

- redisplay_internal (C function)                       2,853,658,459  79%
 - and                                                  2,682,842,214  74%
  - directory-files                                           110,636   0%
   - concat                                                    74,740   0%
      regexp-quote                                             57,316   0%
    file-directory-p

which is a bit strange. I have no idea when "and" should be getting
called so much. The top of the CPU profile looks like this...


- command-execute                                                3996  73%
 - call-interactively                                            3996  73%
  - apply                                                        3996  73%
   - ad-Advice-call-interactively                                3996  73%
    - #<subr call-interactively>                                 3993  73%
     - ido-find-file                                             2231  40%
      - ido-file-internal                                        2231  40%
       - ido-read-internal                                       2181  39%
        - apply                                                  2181  39%
         - ad-Advice-ido-read-internal                           2181  39%
          + #<compiled 0xce6205>     



One other thing that I have noticed is that define-global-minor-mode
adds to the post-command-hook. Currently, this means that my
post-command-hook looks like this....


(global-font-lock-mode-check-buffers global-lentic-mode-check-buffers
global-pabbrev-mode-check-buffers yas-global-mode-check-buffers
global-eval-pulse-mode-check-buffers
global-auto-complete-mode-check-buffers
projectile-global-mode-check-buffers
global-wide-column-mode-check-buffers
wide-column-post-command-hook-function phil-show-paren-mode-check
winner-save-old-configurations mode-local-post-major-mode-change)

which is an awful lot of functions to be called on every keypress. I
realise that I may have gone a bit overboard here, especially as five of
those functions are mine!

I am sort of at a loss as to how to debug this further. Clever ideas
appreciated.

Phil



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

end of thread, other threads:[~2015-03-18 17:04 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-09 11:48 Emacs Slowdown Phillip Lord
2015-03-09 16:16 ` Eli Zaretskii
2015-03-09 21:50   ` Stefan Monnier
2015-03-10 12:37   ` Phillip Lord
2015-03-10 19:00     ` Eli Zaretskii
2015-03-09 21:59 ` Stefan Monnier
2015-03-10 12:39   ` Phillip Lord
2015-03-10 13:22     ` Stefan Monnier
2015-03-12 11:36 ` Phillip Lord
2015-03-16 11:41   ` Phillip Lord
2015-03-16 12:36     ` Stefan Monnier
2015-03-16 16:51       ` Phillip Lord
2015-03-18 12:23         ` Phillip Lord
2015-03-18 12:44           ` Stefan Monnier
2015-03-18 14:13             ` Phillip Lord
2015-03-18 14:53               ` Stefan Monnier
2015-03-18 16:34                 ` Phillip Lord
2015-03-18 16:32             ` Eli Zaretskii
2015-03-18 17:04               ` Phillip Lord

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.