-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
================================================================
Dear Bug Team!
I have been experiencing a performance problem when editing some but
not all Python files. After investigation the problem seems to be with
func-menu. The files I have problems with have simple non-class
functions in the file that are defined differently based upon a
condition like this:
if debugging:
def foo():
print "foo"
else:
def foo():
pass
Now func-menu assumes that all function definitions which don't start
at the beginning of the line are part of a class definition. Therefore
it searches backwards to find the name of the class the function
belongs to. This search fails, but the code assumes it succeeded and
proceeds to extract the class name from the failed search. The results
of this extraction is the whole file, so the resulting function name
includes the complete contents of the file. When the point is moved to
one of these functions this name is displayed in the status bar which
results in XEmacs consuming 100% CPU for several minutes.
I added a check for success of the reverse search, which has solved
the problem for me.
Enclosed is a simple example of the problem. Because of its small size
it doesn't really show the performance problem, but it does show the
incorrect function name.
Also I enclose a patch for version 2.66 of func-menu.el
================================================================
System Info to help track down your bug:
- ---------------------------------------
uname -a: SunOS steel 5.6 Generic_105181-31 sun4u sparc SUNW,Ultra-5_10
./configure '--dynamic' '--prefix=/gorbag/export/cad/xemacs'
'--site-includes=/gorbag/exta/cad/externals/SOLARIS/include'
'--site-libraries=/gorbag/exta/cad/externals/SOLARIS/lib /usr/ucblib'
'--with-xface' '--with-jpeg' '--with-png' '--with-xpm'
'--with-pop' '--with-sound=native' '--cflags=-g -O5 -mcpu=ultrasparc
-fno-schedule-insns'
XEmacs 21.4.13 "Rational FORTRAN" configured for `sparc-sun-solaris2.6'.
Compilation / Installation:
Source code location: /tmp/xemacs-21.4.13
Installation prefix: /gorbag/export/cad/xemacs
Additional header files: /gorbag/exta/cad/externals/SOLARIS/include
Additional libraries: /gorbag/exta/cad/externals/SOLARIS/lib /usr/ucblib
Runtime library search path:
/gorbag/exta/cad/externals/SOLARIS/lib:/usr/ucblib:/usr/openwin/lib:/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/3.2.3/../../..
Operating system description file: `s/sol2.h'
Machine description file: `m/sparc.h'
Compiler: gcc -g -O5 -mcpu=ultrasparc -fno-schedule-insns
Relocating allocator for buffers: yes
GNU version of malloc: yes
Window System:
Compiling in support for the X window system:
- X Windows headers location: /usr/openwin/include
- X Windows libraries location: /usr/openwin/lib
- Handling WM_COMMAND properly.
Using Lucid menubars.
Using Lucid scrollbars.
Using Motif dialog boxes.
Using Motif native widgets.
TTY:
Compiling in support for ncurses.
Images:
Compiling in support for GIF images (builtin).
Compiling in support for XPM images.
Compiling in support for PNG images.
Compiling in support for JPEG images.
Compiling in support for TIFF images.
Compiling in support for X-Face message headers.
Sound:
Compiling in support for sound (native).
Databases:
Compiling in support for Berkeley database.
Compiling in support for GNU DBM.
Internationalization:
Mail:
Compiling in support for POP mail retrieval.
Compiling in support for "dot-locking" mail spool file locking method.
Other Features:
Inhibiting IPv6 canonicalization at startup.
Compiling in support for ToolTalk.
Compiling in support for dynamic shared object modules.
Load-Path Lisp Shadows:
- ----------------------
(/home/2/stevee/lisp/bbdb-expire
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/bbdb/bbdb-expire
/home/2/stevee/lisp/setnu
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/edit-utils/setnu
/home/2/stevee/lisp/highline
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/edit-utils/highline
/home/2/stevee/lisp/avoid
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/edit-utils/avoid
/home/2/stevee/lisp/align
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/edit-utils/align
/home/2/stevee/lisp/vcard
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/gnus/vcard
/home/2/stevee/lisp/xml
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/net-utils/xml
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/ps-print/ps-print
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/ps-print-nomule/ps-print
/home/2/stevee/lisp/xrdb-mode
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/text-modes/xrdb-mode
/home/2/stevee/lisp/xpm-mode
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/text-modes/xpm-mode
/home/2/stevee/lisp/winmgr-mode
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/text-modes/winmgr-mode
/home/2/stevee/lisp/view-process-xemacs
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/view-process/view-process-xemacs
/home/2/stevee/lisp/view-process-system-specific
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/view-process/view-process-system-specific
/home/2/stevee/lisp/view-process-mode
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/view-process/view-process-mode
/export/cad/xemacs/lib/xemacs/xemacs-packages/lisp/build/build-report
/export/cad/xemacs/lib/xemacs-21.4.13/lisp/build-report)
Installed XEmacs Packages:
- -------------------------
((zenirc:version 1.14 :author-version "2.112" :type regular)
(xslt-process :version 1.11 :type regular)
(xslide :version 1.09 :author-version "0.2.2" :type regular)
(xemacs-devel :version
1
.6
:author-version
"No-Upstream-Ver
" :type
single-file)
(xemacs-base :version 1.82 :author-version "No-Upstream-Ver" :type regular)
(x-symbol :version 1.07 :author-version "4.5.1" :type regular)
(w3 :version 1.29 :author-version "4.0pre47" :type regular)
(vm :version 7.18 :author-version "7.17" :type regular)
(viper :version 1.37 :author-version "3.09" :type regular)
(view-process :version 1.13 :author-version "2.4" :type regular)
(vhdl :version 1.18 :author-version "3.31.20" :type regular)
(vc-cc :version 1.22 :author-version "No-Upstream-Ver" :type regular)
(vc :version 1.38 :author-version "No-Upstream-Ver" :type regular)
(tramp :version 1.16 :type regular)
(tpu :version 1.14 :author-version "4.2X" :type regular)
(tooltalk :version 1.15 :author-version "No-Upstream-Ver" :type regular)
(tm :version 1.37 :author-version "No-Upstream-Ver" :type regular)
(time :version 1.14 :author-version "1.17" :type regular)
(textools :version 1.15 :author-version "No-Upstream-Ver" :type regular)
(text-modes :version
1
.71
:author-version
"No-Upstream-Ver
" :type
single-file)
(texinfo :version 1.25 :author-version "No-Upstream-Ver" :type regular)
(supercite :version 1.2 :author-version "3.55x3" :type regular)
(strokes :version 1.1 :author-version "No-Upstream-Ver" :type regular)
(speedbar :version 1.27 :author-version "0.14beta4" :type regular)
(sounds-wav :version 1.12 :author-version "No-Upstream-Ver" :type regular)
(sounds-au :version 1.12 :author-version "No-Upstream-Ver" :type regular)
(sml-mode :version 0.1 :author-version "3.9.5" :type regular)
(slider :version 1.15 :author-version "0.3x1" :type regular)
(sieve :version 1.14 :author-version "No-Upstream-Ver" :type regular)
(sh-script :version 1.18 :author-version "2.0e" :type regular)
(sgml :version 1.1 :author-version "No-Upstream-Ver" :type regular)
(semantic :version 1.18 :author-version "1.4.2" :type regular)
(scheme :version 1.14 :author-version "No-Upstream-Ver" :type regular)
(sasl :version 1.14 :author-version "1.14.4" :type regular)
(rmail :version 1.13 :type regular)
(reftex :version 1.33 :author-version "4.21" :type regular)
(python-modes :version
1
.03
:author-version
"No-Upstream-Ver
" :type
single-file)
(psgml :version 1.41 :type regular)
(ps-print-nomule :version 1.05 :type regular)
(ps-print :version 1.09 :author-version "6.5.6" :type regular)
(prog-modes
:version
1
.91
:author-version
"No-Upstream-Ver
" :type
single-file)
(pgg :version 1.04 :author-version "0.1" :type regular)
(perl-modes :version
1
.05
:author-version
"No-Upstream-Ver
" :type
single-file)
(pcomplete :version 1.03 :author-version "1.1.6" :type regular)
(pcl-cvs :version 1.65 :author-version "R-2_9_9" :type regular)
(pc :version 1.26 :author-version "No-Upstream-Ver" :type single-file)
(os-utils :version 1.34 :author-version "No-Upstream-Ver" :type single-file)
(net-utils :version
1
.33
:author-version
"No-Upstream-Ver
" :type
single-file)
(mmm-mode :version 1.01 :author-version "0.4.7" :type regular)
(misc-games :version
1
.18
:author-version
"No-Upstream-Ver
" :type
single-file)
(mine :version 1.16 :author-version "1.9" :type regular)
(mh-e :version 1.27 :author-version "7.4.2" :type regular)
(mew :version 1.18 :author-version "1.94.2" :type regular)
(mailcrypt :version 2.13 :author-version "3.5.8" :type regular)
(mail-lib :version 1.63 :author-version "No-Upstream-Ver" :type regular)
(jde :version 1.46 :type regular)
(ispell :version 1.26 :author-version "3.3" :type regular)
(ilisp :version 1.33 :author-version "5.12.0" :type regular)
(igrep :version 1.12 :author-version "2.95" :type regular)
(idlwave :version 1.31 :author-version "5.1" :type regular)
(ibuffer :version 1.09 :author-version "No-Upstream-Ver" :type regular)
(hm--html-menus :version 1.23 :author-version "5.9" :type regular)
(gnus :version 1.73 :type regular)
(gnats :version 1.16 :author-version "3.101" :type regular)
(games :version 1.15 :author-version "1.04" :type regular)
(fsf-compat :version
1
.13
:author-version
"No-Upstream-Ver
" :type
single-file)
(frame-icon :version 1.11 :author-version "No-Upstream-Ver" :type regular)
(forms :version 1.15 :author-version "2.37" :type regular)
(footnote :version 1.16 :author-version "0.18x" :type regular)
(eudc :version 1.39 :author-version "1.32" :type regular)
(eterm :version 1.15 :author-version "No-Upstream-Ver" :type regular)
(eshell :version 1.06 :author-version "2.4.1" :type regular)
(emerge :version 1.11 :author-version "No-Upstream-Ver" :type regular)
(elib :version 1.11 :author-version "1.0" :type single-file)
(eieio :version 1.05 :author-version "0.17" :type regular)
(efs :version 1.32 :author-version "1.22" :type regular)
(edt :version 1.13 :author-version "No-Upstream-Ver" :type regular)
(edit-utils :version
2
.1
:author-version
"No-Upstream-Ver
" :type
single-file)
(ediff :version 1.49 :author-version "2.75" :type regular)
(edebug :version 1.2 :author-version "No-Upstream-Ver" :type regular)
(ecrypto :version 0.14 :author-version "2.0" :type regular)
(ecb :version 1.13 :author-version "1.96" :type regular)
(docbookide :version
0
.07000000000000001
:author-version
"0
.1
" :type
regular)
(dired :version 1.15 :author-version "7.11" :type regular)
(dictionary :version 1.12 :type regular)
(debug :version 1.17 :author-version "No-Upstream-Ver" :type regular)
(crisp :version 1.14 :author-version "1.34" :type regular)
(cookie :version 1.15 :author-version "No-Upstream-Ver" :type regular)
(clearcase :version 1.08 :author-version "No-Upstream-Ver" :type regular)
(cc-mode :version 1.41 :author-version "5.30.7" :type regular)
(calendar :version 1.22 :author-version "No-Upstream-Ver" :type regular)
(calc :version 1.24 :author-version "2.02fX3" :type regular)
(c-support :version
1
.18
:author-version
"No-Upstream-Ver
" :type
single-file)
(build :version 1.14 :author-version "2.02" :type regular)
(bbdb :version 1.24 :author-version "2.34" :type regular)
(auctex :version 1.35 :type regular)
(apel :version 1.27 :author-version "10.2" :type regular)
(ada :version 1.14 :author-version "2.27" :type regular)
(Sun :version 1.15 :author-version "No-Upstream-Ver" :type regular))
Installed Modules:
- -----------------
Features:
- --------
(auto-sig flyspell ispell mail-extr gnus-msg gnus-art mm-uu mml2015
pgg pgg-parse pgg-def mm-view gnus-sum nnoo gnus-group gnus-undo
nnmail mail-source format-spec gnus-start gnus-spec gnus-int
gnus-range gnus-win gnus gnus-ems gnus-xmas wid-edit xemacsbug shadow
whitespace-mode imenu python-mode paren blink-paren lazy-shot cc-fonts
font-lock pending-del blink-cursor highlight-region crypt crypt++
outln-18 outl-mouse outline annotations filladapt bbdb-expire
bbdb-hooks efs-cu bbdb-com bbdb timezone cc-mode cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt multishell
uniquify frame-icon kfm browse-url func-menu redo gnuserv recent-files
package-get package-admin config a2ps byte-optimize bytecomp
byte-compile bookmark pp dired-faces dired-xemacs dired repeater
edmacro browse-kill-ring align savehist time vc vc-hooks message
messagexmas mml mml-sec mml-smime smime dig mm-decode mm-bodies
mm-encode mailcap lpr mail-parse rfc2045 rfc2231 rfc2047 qp ietf-drums
mail-abbrevs sendmail nnheader nnheaderxm gnus-util netrc time-date
parse-time mm-util mail-prsvr mail-utils mailheader canlock diff
diff-mode boxquote rect vvb-mode highline overlay env ibuffer cus-face
rsz-minibuf mailcrypt rfc822 comint ring advice advice-preload
zenirc-autoloads xslt-process-autoloads xslide-autoloads
xemacs-devel-autoloads xemacs-base-autoloads x-symbol-autoloads
w3-autoloads vm-autoloads viper-autoloads view-process-autoloads
vhdl-autoloads vc-cc-autoloads vc-autoloads tramp-autoloads
tpu-autoloads tooltalk-autoloads tm-autoloads time-autoloads
textools-autoloads text-modes-autoloads texinfo-autoloads
supercite-autoloads strokes-autoloads speedbar-autoloads
sounds-wav-autoloads sounds-au-autoloads sml-mode-autoloads
slider-autoloads sieve-autoloads sh-script-autoloads sgml-autoloads
semantic-autoloads scheme-autoloads sasl-autoloads rmail-autoloads
reftex-autoloads python-modes-autoloads psgml-autoloads
ps-print-nomule-autoloads ps-print-autoloads prog-modes-autoloads
pgg-autoloads perl-modes-autoloads pcomplete-autoloads
pcl-cvs-autoloads pc-autoloads os-utils-autoloads net-utils-autoloads
mmm-mode-autoloads misc-games-autoloads mine-autoloads mh-e-autoloads
mew-autoloads mailcrypt-autoloads mail-lib-autoloads jde-autoloads
ispell-autoloads ilisp-autoloads igrep-autoloads idlwave-autoloads
ibuffer-autoloads hm--html-menus-autoloads gnus-autoloads
gnats-autoloads games-autoloads fsf-compat-autoloads
frame-icon-autoloads forms-autoloads footnote-autoloads eudc-autoloads
eterm-autoloads eshell-autoloads emerge-autoloads elib-autoloads
eieio-autoloads efs-autoloads edt-autoloads edit-utils-autoloads
ediff-autoloads edebug-autoloads ecrypto-autoloads ecb-autoloads
docbookide-autoloads dired-autoloads dictionary-autoloads
debug-autoloads crisp-autoloads cookie-autoloads clearcase-autoloads
cc-mode-autoloads calendar-autoloads calc-autoloads
c-support-autoloads build-autoloads bbdb-autoloads auctex-autoloads
apel-autoloads ada-autoloads Sun-autoloads lisp-autoloads loadhist
auto-show fontl-hooks x-iso8859-1 gutter-items menubar-items x-menubar
mode-motion mouse itimer auto-save lisp-mode easymenu iso8859-1 page
buff-menu lib-complete help-nomule cus-file derived frame text-props
obsolete cus-start custom widget cl-extra mini-cl cl cl-19 packages
backquote very-early-lisp tooltalk lucid-scrollbars cut-buffer
lucid-menubars motif-dialogs x c-balloon-help tty-frames tty toolbar
native-sound scrollbar unix-processes multicast network-streams
subprocesses modules menu-accelerator-support menubar berkeley-db dbm
md5 xemacs gutter tiff png gif jpeg xface xpm xbm lisp-float-type
usg-unix-v dialog devices window-system base64)
Recent keystrokes:
- -----------------
down M-m C-k p [ a BS BS a s s up up up up up up RET
d e b u g g i n g SPC = SPC 0 RET C-x C-s button1 button1up
C-x C-v RET misc-user up up down down down down up
up up up up up C-home misc-user next next next next
next next next next next next next next prior M-x f
u n c - m TAB BS TAB TAB BS BS BS BS TAB u m e TAB
TAB l i TAB f TAB RET C-home C-x 1 C-end C-home mi
sc-user
Recent messages (most recent first):
- -----------------------------------
Loading auto-sig...done
Loading auto-sig...
Starting new Ispell process...
Loading flyspell...done
Loading flyspell...
Loading mail-extr...done
Loading mail-extr...
Loading gnus-msg...done
Loading gnus-xmas...done
Loading gnus-xmas...
Loading gnus-msg...
Loading xemacsbug...done
Loading xemacsbug...
Making completion list...
Making completion list...
Using the CPython shell
Local value of py-indent-offset set to 4
Wrote /home/2/stevee/tmp/example.py
Using the CPython shell
Local value of py-indent-offset set to 4
- --
____________________________________________________________________________
Steve Evans,
Zuken Limited, TEL: +44 (0)1454 207800 ext 8607
1500 Aztec West, Fax: +44 (0)1454 207803
Almondsbury, mailto:stevee@zuken.co.uk
Bristol, BS32 4RF, UK Web:
http://www.zuken.com
Registered Linux user #217906:
http://counter.li.org
Public Encryption Key:
http://www.gorbag.com/public-key-work.html
_____________________________________________________________________________
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (SunOS)
Comment: Processed by Mailcrypt 3.5.8 <
http://mailcrypt.sourceforge.net/>
iD8DBQE/xjZD1a67iNP86GcRAji1AJ9tkIiRcznWHtpUvT5rWHnjRPd43gCeNOhW
1IYl8TeUjUDvmi4kirL4f10=
=Om/u
-----END PGP SIGNATURE-----