GNU bug report logs - #14058
24.3; which-func-mode / python-mode == crazy slow

Previous Next

Package: emacs;

Reported by: Dave Abrahams <dave <at> boostpro.com>

Date: Tue, 26 Mar 2013 14:54:02 UTC

Severity: normal

Fixed in version 24.3

Done: fgallina <at> gnu.org

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14058 in the body.
You can then email your comments to 14058 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#14058; Package emacs. (Tue, 26 Mar 2013 14:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dave Abrahams <dave <at> boostpro.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 26 Mar 2013 14:54:02 GMT) Full text and rfc822 format available.

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

From: Dave Abrahams <dave <at> boostpro.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; which-func-mode / python-mode == crazy slow
Date: Tue, 26 Mar 2013 06:59:49 -0700
[Message part 1 (text/plain, inline)]
emacs -Q
M-x which-func-mode RET
visit this file:
https://github.com/boostorg/litre/blob/master/cplusplus.py
C-x C-v cplusplus.py RET

Notice it being really slow.  CPU profile report attached.

[cpu-profile.txt (text/plain, attachment)]
[Message part 3 (text/plain, inline)]


In GNU Emacs 24.3.1 (x86_64-apple-darwin11.4.2, Carbon Version 1.6.0 AppKit 1138.51)
 of 2013-03-08 on atago.hsd1.ma.comcast.net
Windowing system distributor `Apple Inc.', version 10.9.0
Configured using:
 `configure '--with-mac'
 '--enable-mac-app=/Users/xin/Documents/emacs-mac-port/build'
 '--prefix=/Users/xin/Documents/emacs-mac-port/build''

Important settings:
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Python

Minor modes in effect:
  shell-dirtrack-mode: t
  recentf-mode: t
  diff-auto-refine-mode: t
  override-global-mode: t
  workgroups-mode: t
  me-minor-mode: t
  show-paren-mode: t
  server-mode: t
  global-auto-revert-mode: t
  display-time-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  mac-mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-p C-p C-p C-p <C-return> C-p C-p C-p C-p C-p <return> 
C-n <return> C-n <return> C-n <return> C-n <return> 
C-n C-n C-n <return> C-n <return> C-n <return> C-n 
<return> C-n C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-e C-, C-a C-. <return> <return> 
<return> <return> <return> <return> <return> C-h m 
<C-return> C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n <C-return> C-h e f <return> C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-x C-k C-n 
<return> C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p <C-return> 
C-x b <right> <return> <tab> C-b C-b C-n C-p <tab> 
<tab> C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p C-p 
<tab> <tab> <C-return> M-x r e p o r t <tab> u <tab> 
p <backspace> <return> C-g C-g M-! e m a c s 2 SPC 
- Q <return> M-: M-p C-k C-g <down-mouse-1> <mouse-1> 
C-h e f <return> C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-x C-b M-x w h i c h - f u 
n <tab> - <tab> <return> C-x b c p l u <return> C-x 
C-v <return> C-x C-v <return> C-x C-v <return> ' C-_ 
C-x C-v <return> C-x C-v <return> C-x C-v <return> 
M-x r e p o r t - u p <tab> <return> C-g C-g M-! m 
a i l q <return> M-! s u d o SPC m a i l q <return> 
M-! M-p <return> M-! M-p M-p <return> C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p M-x r e p o r t - u p <tab> 
<return>

Recent messages:
Quit [2 times]
(Shell command succeeded with no output)
Quit
Which-Function mode disabled
Auto-saving...done
Undo!
Quit [2 times]
postqueue: fatal: Queue report unavailable - mail system is down
postqueue: warning: Mail system is down -- accessing queue directly
Mail queue is empty [3 times]

Load-path shadows:
/Users/dave/.emacs.d/el-get/magit/.dir-locals hides /Users/dave/.emacs.d/el-get/el-get/.dir-locals
/Users/dave/.emacs.d/el-get/dwamacs/site-lisp/ediff-util hides /Applications/Emacs.app/Contents/Resources/lisp/vc/ediff-util
/Users/dave/.emacs.d/el-get/python/python hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/python
/Users/dave/.emacs.d/el-get/dwamacs/site-lisp/compile hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/compile
/Users/dave/.emacs.d/el-get/magit/.dir-locals hides /Applications/Emacs.app/Contents/Resources/lisp/gnus/.dir-locals
/Users/dave/.emacs.d/el-get/dwamacs/site-lisp/ert hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/ert
/Users/dave/.emacs.d/el-get/dwamacs/site-lisp/ert-x hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/ert-x

Features:
(shadow sort mail-extr debug find-dired grep view magit-svn dired-aux
gnus-dired sh-script smie executable format-spec cal-menu calendar
cal-loaddefs man rect tabify table code-settings rst w3m-form mule-util
w3m-cookie w3m-bookmark w3m-tabmenu w3m-session thingatpt w3m browse-url
doc-view image-mode timezone w3m-hist w3m-fb bookmark-w3m w3m-ems
w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util hl-line shell
pcomplete compile vc-git python skeleton rx comint recentf tree-widget
profiler misearch multi-isearch magit-bisect magit-key-mode magit
ansi-color diff-mode log-edit ring pcvs-util add-log proof-site
proof-autoloads pg-vars page-ext ffap url-parse auth-source eieio
gnus-util mm-util mail-prsvr password-cache url-vars use-package
bind-key session-settings session system-type-darwin-theme osx-plist xml
.loaddefs yasnippet dropdown-list derived workgroups edmacro kmacro
initsplit byte-opt warnings advice advice-preload cus-edit wid-edit
find-func diminish el-get el-get-autoloads el-get-list-packages
el-get-notify help-mode el-get-dependencies el-get-build el-get-status
pp el-get-recipes el-get-byte-compile el-get-methods el-get-fossil
el-get-svn el-get-pacman el-get-github-zip el-get-github-tar
el-get-http-zip el-get-http-tar el-get-hg el-get-git-svn el-get-fink
el-get-emacswiki el-get-http el-get-emacsmirror el-get-github el-get-git
el-get-elpa package cl-macs gv el-get-darcs el-get-cvs el-get-bzr
el-get-brew el-get-builtin el-get-apt-get el-get-custom el-get-core
autoload help-fns bytecomp byte-compile cconv cl cl-lib dired-x dired
easy-mmode jka-compr info easymenu which-func imenu paren server ido
autorevert time delsel cus-start cus-load elhome time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel mac-win tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment lisp-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote multi-tty make-network-process emacs)

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14058; Package emacs. (Fri, 05 Apr 2013 22:14:01 GMT) Full text and rfc822 format available.

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

From: fgallina <at> gnu.org
To: 14058 <at> debbugs.gnu.org
Subject: 24.3; which-func-mode / python-mode == crazy slow
Date: Fri, 05 Apr 2013 19:12:23 -0300
I can confirm this happens and that this is not python.el's
python-info-current-defun fault directly.

which-func-mode detects if a mode is elegible to use it by building the
imenu index. So the real issue here is how much python.el takes for
building it.

For now a simple workaround that avoids building the index at startup
when which-func-mode does the detection is to add 'python-mode to the
`which-func-modes' list. This way the `imenu-create-index-function' will
not be invoked.




Reply sent to fgallina <at> gnu.org:
You have taken responsibility. (Fri, 19 Apr 2013 03:14:02 GMT) Full text and rfc822 format available.

Notification sent to Dave Abrahams <dave <at> boostpro.com>:
bug acknowledged by developer. (Fri, 19 Apr 2013 03:14:02 GMT) Full text and rfc822 format available.

Message #13 received at 14058-done <at> debbugs.gnu.org (full text, mbox):

From: fgallina <at> gnu.org
To: 14058-done <at> debbugs.gnu.org
Subject: 24.3; which-func-mode / python-mode == crazy slow
Date: Fri, 19 Apr 2013 00:08:47 -0300
This is fixed in revno 112328.




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

This bug report was last modified 11 years and 4 days ago.

Previous Next


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