From xemacs-m  Tue Jan 14 00:31:59 1997
Received: from UCSD.EDU (mailbox1.ucsd.edu [132.239.1.53])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id AAA09695 for <xemacs-beta@xemacs.org>; Tue, 14 Jan 1997 00:31:58 -0600 (CST)
Received: from sdnp5.ucsd.edu (sdnp5.ucsd.edu [132.239.79.10]) by UCSD.EDU (8.8.3/8.6.9) with SMTP id WAA20249; Mon, 13 Jan 1997 22:31:55 -0800 (PST)
Received: by sdnp5.ucsd.edu (SMI-8.6/SMI-SVR4)
	id WAA16118; Mon, 13 Jan 1997 22:29:39 -0800
Sender: dmoore@sdnp5.ucsd.edu
To: xemacs-beta@xemacs.org
Cc: Roland McGrath <roland@prep.ai.mit.edu>
Subject: compile.el patch (was Re: compilation buffer problems)
References: <199701130935.JAA00059@wrath.parallax.co.uk> <uglo9xr0po.fsf@pochacco.alphatech.com>
X-Face: "oX;zS#-JU$-,WKSzG.1gGE]x^cIg!hW.dq>.f6pzS^A+(k!T|M:}5{_%>Io<>L&{hO7W4cicOQ|>/lZ1G(m%7iaCf,6Qgk0%%Bz7b2-W3jd0m_UG\Y;?]}4s0O-U)uox>P3JN)9cm]O\@,vy2e{`3pb!"pqmRy3peB90*2L
From: David Moore <dmoore@UCSD.EDU>
Date: 13 Jan 1997 22:29:39 -0800
In-Reply-To: Greg Klanderman's message of 13 Jan 1997 11:36:51 -0500
Message-ID: <rvpvz8ojl8.fsf_-_@sdnp5.ucsd.edu>
Lines: 56
X-Mailer: Red Gnus v0.80/XEmacs 19.15

Greg Klanderman <greg@alphatech.com> writes:

> >>>>> "Andy" == Andy Piper <andyp@parallax.co.uk> writes:
> Andy> 
> Andy> Is no-one else seeing this aching slowness in parsing the compilation
> Andy> buffer? Its incredibly irritating, much worse than 19.14 and I would
> Andy> have thought a "must-fix" for the release.
> 
> Yes, this is extremely painful even on my ULTRASPARC 1 running nothing else.
> Some very rough performance numbers from my last few compiles follow (19.15b4):
> 
>  lines   time (sec)
>  ~~~~~   ~~~~~~~~~~
>   170     25
>   210     30
>   287     50
>   377     80

	One regexp in the search pattern seemed to encourage very poor
behaviour, and I also think it was wrong.  Here's a patch.  I can only
assume it was meant to be anchored at the beginning of the line.  But it
did seem to encourage O(n^2) backtracking in the regexp code when
combined with everything else.  On output with 500 errors, this patch
reduces time to parse from 54 seconds to 33 (on my sparc server 5).
Still ridiculous, but helps.


--- compile.el.orig	Mon Jan 13 21:58:44 1997
+++ compile.el	Mon Jan 13 22:20:13 1997
@@ -154,9 +154,9 @@
 
     ;; MIPS lint pass<n>; looks good for SunPro lint also
     ;;  TrimMask (255) in solomon.c may be indistinguishable from TrimMasks (93) in solomon.c due to truncation
-    ("[^ ]+ (\\([0-9]+\\)) in \\([^ ]+\\)" 2 1)
+    ("\n[^ \n]+ (\\([0-9]+\\)) in \\([^ \n]+\\)" 2 1)
     ;;  name defined but never used: LinInt in cmap_calc.c(199)
-    ("in \\([^(]+\\)(\\([0-9]+\\))$" 1 2)
+    ("in \\([^(\n]+\\)(\\([0-9]+\\))$" 1 2)
 
     ;; Ultrix 3.0 f77:
     ;;  fort: Severe: addstf.f, line 82: Missing operator or delimiter symbol
@@ -226,7 +226,7 @@
 
     ;; Sun ada (VADS, Solaris):
     ;;  /home3/xdhar/rcds_rc/main.a, line 361, char 6:syntax error: "," inserted
-    ("\n\\([^, ]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., \(-]" 1 2 3)
+    ("\n\\([^, \n\t]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., \(-]" 1 2 3)
     )
   "Alist that specifies how to match errors in compiler output.
 Each elt has the form (REGEXP FILE-IDX LINE-IDX [COLUMN-IDX FILE-FORMAT...])

-- 
David Moore <dmoore@ucsd.edu>       | Computer Systems Lab      __o
UCSD Dept. Computer Science - 0114  | Work: (619) 534-8604    _ \<,_
La Jolla, CA 92093-0114             | Fax:  (619) 534-1445   (_)/ (_)
<URL:http://oj.egbt.org/dmoore/>    | In cloud bones of steel.

