all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Klaus Zeitler <kzeitler@lucent.com>
Cc: emacs-devel@gnu.org
Subject: Re: cperl + isearch + font-lock-multiline sometimes very slow
Date: Fri, 20 Oct 2006 14:05:00 +0200	[thread overview]
Message-ID: <q5gac3rchw3.fsf@sfsw51.de.lucent.com> (raw)
In-Reply-To: <87hcxzd4zx.fsf@furball.mit.edu> (Chong Yidong's message of "Thu\, 19 Oct 2006 23\:45\:54 -0400")

>>>>> "Chong" == Chong Yidong <cyd@stupidchicken.com> writes:
    Chong> 
    Chong> I can't reproduce this.  Could you provide a detailed recipe and/or
    Chong> test file?

I've now managed to reduce my .emacs file from 4000 lines to the following
3 lines:
--- snip ---
(setq font-lock-multiline t)
(require 'printing "printing" 'no-error)
(fset 'perl-mode 'cperl-mode)
--- snip ---

With these 3 lines I can still observe the problem.
1. Start emacs with .emacs containing the 3 lines above
2. load a Perl file (not too small), I use perl5db.pl from the Perl distribution
3. Watch emacs CPU usage

After approximaetly 25 seconds, the CPU usage climbs for nearly 3 minutes
to 55% and emacs behaves very sluggish. Afterwards emacs behaves normal.
No need for isearch, that was obviously a misinterpretation. Don't know
what the package 'printing' has to do with it. Maybe it's a problem with
menu-bar updates and stealth fontification.

    Chong> Also, see if the slowdown goes away if you increase REGEXP_CACHE_SIZE
    Chong> to (e.g.) 40 in search.c, as Kim suggested.
    Chong> 
    Chong> #define REGEXP_CACHE_SIZE 20

Changing to REGEXP_CACHE_SIZE to 40 didn't change the behavior.

BTW changing REGEXP_CACHE_SIZE to a value >40 caused a core with temacs
gcc  -L/usr/ccs/lib `./prefix-args -Xlinker -R/usr/openwin/lib -R/usr/local/gnu/lib -R/opt/exp/gnu/lib -R/opt/exp/lib -R/opt/exp/lib/xpm/lib` `{ set x ; test "$2" = "USE_MOTIF"; } || echo ' -R/usr/dt/lib -L/usr/dt/lib'` -L/usr/openwin/lib -L/usr/local/gnu/lib -L/opt/exp/gnu/lib -L/opt/exp/lib -L/opt/exp/lib/xpm/lib -o temacs  dispnew.o frame.o scroll.o xdisp.o xmenu.o window.o charset.o coding.o category.o ccl.o cm.o term.o xfaces.o xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o  emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o filemode.o cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o print.o lread.o abbrev.o syntax.o unexelf.o bytecode.o process.o callproc.o region-cache.o sound.o atimer.o doprnt.o strftime.o intervals.o textprop.o composite.o md5.o    terminfo.o lastfile.o gmalloc.o ralloc.o vm-limit.o  widget.o mktime.o   ../lwlib/liblw.a -L/usr/openwin/lib -L/usr/local/gnu/lib -L/opt/exp/gnu/lib -L/opt/exp/lib -L/opt/exp/lib/xpm/lib -lXm -lgen -lXp -lXmu -lXt -lSM -lICE -lXext -ltiff -ljpeg -lpng -lz -lm -lungif -lXpm -lX11  -lsocket -lnsl -lkstat -lcurses -lkstat  -lm
./temacs --batch --load loadup bootstrap
make[2]: *** [bootstrap-emacs] Abort (core dumped)
make[2]: Leaving directory `/vol/freeware/SunOS-5.8/build/emacs-cvs/src'
make[1]: *** [bootstrap-build] Error 2

HTH

Klaus

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
Psychiatrists say that one out of four people are mentally
ill.  Check three friends.  If they're OK, you're it.

  reply	other threads:[~2006-10-20 12:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-19  6:21 cperl + isearch + font-lock-multiline sometimes very slow Klaus Zeitler
2006-10-19  7:48 ` Richard Stallman
2006-10-19 11:26   ` Kim F. Storm
2006-10-20  6:06     ` Richard Stallman
2006-10-20  3:45 ` Chong Yidong
2006-10-20 12:05   ` Klaus Zeitler [this message]
2006-10-20 12:50     ` Chong Yidong
2006-10-20 22:52       ` Chong Yidong
2006-10-21 15:57     ` martin rudalics
2006-10-22 17:31       ` Chong Yidong
2006-10-22 20:34         ` martin rudalics
2006-10-22 21:01           ` Chong Yidong
2006-10-23  8:37         ` Klaus Zeitler
2006-10-23 20:25           ` Stefan Monnier
2006-10-23 20:52             ` Stefan Monnier
2006-10-22  9:57     ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=q5gac3rchw3.fsf@sfsw51.de.lucent.com \
    --to=kzeitler@lucent.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.