From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Klaus Zeitler Newsgroups: gmane.emacs.devel Subject: Re: cperl + isearch + font-lock-multiline sometimes very slow Date: Fri, 20 Oct 2006 14:05:00 +0200 Message-ID: References: <87hcxzd4zx.fsf@furball.mit.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1161371398 2925 80.91.229.2 (20 Oct 2006 19:09:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Oct 2006 19:09:58 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 20 21:09:56 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gazjw-0007Ue-4z for ged-emacs-devel@m.gmane.org; Fri, 20 Oct 2006 21:09:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gazjv-0000NI-KL for ged-emacs-devel@m.gmane.org; Fri, 20 Oct 2006 15:09:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gat7w-0008AH-6e for emacs-devel@gnu.org; Fri, 20 Oct 2006 08:05:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gat7u-00086X-M0 for emacs-devel@gnu.org; Fri, 20 Oct 2006 08:05:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gat7u-000858-07 for emacs-devel@gnu.org; Fri, 20 Oct 2006 08:05:26 -0400 Original-Received: from [135.245.0.33] (helo=ihemail1.lucent.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Gat7t-0007jD-HD for emacs-devel@gnu.org; Fri, 20 Oct 2006 08:05:25 -0400 Original-Received: from nbgif1.de.lucent.com (h135-246-31-82.lucent.com [135.246.31.82]) by ihemail1.lucent.com (8.13.8/IER-o) with ESMTP id k9KC5Msg024223; Fri, 20 Oct 2006 07:05:23 -0500 (CDT) Original-Received: from sfsws1.de.lucent.com (sfsws1 [135.246.31.38]) by nbgif1.de.lucent.com (8.11.7p2+Sun/8.11.7) with ESMTP id k9KC5L424213; Fri, 20 Oct 2006 14:05:21 +0200 (MEST) Original-Received: from sfsw51.de.lucent.com (sfsw51.de.lucent.com [135.246.72.99]) by sfsws1.de.lucent.com (8.11.7p2+Sun/8.8.5) with ESMTP id k9KC50M27509; Fri, 20 Oct 2006 14:05:07 +0200 (MEST) Original-Received: (from kzeitler@localhost) by sfsw51.de.lucent.com (8.11.7p1+Sun/8.8.8) id k9KC50g16990; Fri, 20 Oct 2006 14:05:00 +0200 (MEST) X-Authentication-Warning: sfsw51.de.lucent.com: kzeitler set sender to kzeitler@lucent.com using -f Original-To: Chong Yidong X-Meat: Duck In-Reply-To: <87hcxzd4zx.fsf@furball.mit.edu> (Chong Yidong's message of "Thu\, 19 Oct 2006 23\:45\:54 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (usg-unix-v) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60955 Archived-At: >>>>> "Chong" =3D=3D Chong Yidong writes: Chong>=20 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 distrib= ution 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>=20 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" =3D "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/o= pt/exp/lib/xpm/lib -o temacs dispnew.o frame.o scroll.o xdisp.o xmenu.o wi= ndow.o charset.o coding.o category.o ccl.o cm.o term.o xfaces.o xterm.o xfn= s.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 ca= llproc.o region-cache.o sound.o atimer.o doprnt.o strftime.o intervals.o te= xtprop.o composite.o md5.o terminfo.o lastfile.o gmalloc.o ralloc.o vm-l= imit.o widget.o mktime.o ../lwlib/liblw.a -L/usr/openwin/lib -L/usr/loca= l/gnu/lib -L/opt/exp/gnu/lib -L/opt/exp/lib -L/opt/exp/lib/xpm/lib -lXm -lg= en -lXp -lXmu -lXt -lSM -lICE -lXext -ltiff -ljpeg -lpng -lz -lm -lungif -l= Xpm -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 --=20 ------------------------------------------ | 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.