From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#39595: #39595: M-x compile still very line-length weak Date: Fri, 14 Feb 2020 23:47:43 +0100 Message-ID: <7A842DF4-BACB-4CB2-A9DD-40AA57CA8DF0@acm.org> References: <9D8A11CB-9ABE-4A66-87D0-2E445499B74F@acm.org> <83tv3tnlx3.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_F14DADC2-22DC-4C61-84E2-9CFC7CACE475" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="66905"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39595@debbugs.gnu.org, jidanni@jidanni.org, pogonyshev@gmail.com, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 14 23:48:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j2jkq-000HIp-Q5 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Feb 2020 23:48:12 +0100 Original-Received: from localhost ([::1]:46418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2jkp-0007pm-Sd for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Feb 2020 17:48:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45859) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2jki-0007pM-3W for bug-gnu-emacs@gnu.org; Fri, 14 Feb 2020 17:48:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2jkg-0001XG-VW for bug-gnu-emacs@gnu.org; Fri, 14 Feb 2020 17:48:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57125) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2jkg-0001WB-JJ for bug-gnu-emacs@gnu.org; Fri, 14 Feb 2020 17:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j2jkg-0000ks-Hy for bug-gnu-emacs@gnu.org; Fri, 14 Feb 2020 17:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Feb 2020 22:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39595 X-GNU-PR-Package: emacs Original-Received: via spool by 39595-submit@debbugs.gnu.org id=B39595.15817204772890 (code B ref 39595); Fri, 14 Feb 2020 22:48:02 +0000 Original-Received: (at 39595) by debbugs.gnu.org; 14 Feb 2020 22:47:57 +0000 Original-Received: from localhost ([127.0.0.1]:34865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2jka-0000kY-OH for submit@debbugs.gnu.org; Fri, 14 Feb 2020 17:47:56 -0500 Original-Received: from mail1448c50.megamailservers.eu ([91.136.14.48]:55604 helo=mail265c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2jkZ-0000kL-DJ for 39595@debbugs.gnu.org; Fri, 14 Feb 2020 17:47:56 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1581720468; bh=ic/Sz1bVjSqLtIs1EAm/hmbTxQPJGnFM7eLNq7rA/Ac=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=TYQq5GLHW3gzfzrWwM4A6eXv/aGqa1w/5SYEPZiHCxvwPLn6zqKX+8+gMqAuhnSiy alUJXoqMLHlgNcRioYdC99kmGV3XU+67CkNFzlXA4tIlgC9z3lFlL0aEVl96rWW24I YT3IfAQ/k3VAzrmzIvBWAj4BIqjgma/UmfJ8saMQ= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail265c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 01EMli30001859; Fri, 14 Feb 2020 22:47:46 +0000 In-Reply-To: <83tv3tnlx3.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020A.5E472394.0019, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=YIzhNiOx c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=W5zR9GYl-WMolKA5B9YA:9 a=CjuIK1q_8ugA:10 a=kZ5RKdf9fqByTGCrS1kA:9 a=B2y7HmGcmWMA:10 a=2Up9zCP-_lcUppEizuUA:9 a=_FVE-zBwftR9WsbkzFJk:22 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:176069 Archived-At: --Apple-Mail=_F14DADC2-22DC-4C61-84E2-9CFC7CACE475 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 14 feb. 2020 kl. 18.00 skrev Eli Zaretskii : > Is there some forum where the relevant people could be asked about > this? Not sure where to go for that. The problem is really in Emacs's hacky = implementation: when 'omake' is included in = compilation-error-regexp-alist, many other regexps are rewritten in a = way that makes them potentially slower. This is why it's not an ideal = feature to have enabled by default. Attached are two patches: one that anchors the regexp for Maven, and one = that speeds up 'msft' and 'watcom' by eliminating the same = repetition-after-repetition flaw in each (not much different from those = found by the latest relint/xr scan posted to emacs-devel). --Apple-Mail=_F14DADC2-22DC-4C61-84E2-9CFC7CACE475 Content-Disposition: attachment; filename=0001-Speed-up-maven-compilation-error-message-regexp.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Speed-up-maven-compilation-error-message-regexp.patch" Content-Transfer-Encoding: quoted-printable =46rom=203d589111903e823c9fab3a94e42a7339ad9edd89=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=2014=20Feb=202020=2021:26:20=20+0100=0A= Subject:=20[PATCH=201/2]=20Speed=20up=20'maven'=20compilation=20error=20= message=20regexp=0A=0AAnchor=20the=20regexp=20at=20line-start=20to=20= prevent=20quadratic=20behaviour=20when=0Ait=20doesn't=20match=20= (bug#39595).=0A=0A*=20lisp/progmodes/compile.el=20= (compilation-error-regexp-alist-alist):=0ARewrite=20'maven'=20regexp,=20= using=20rx=20for=20clarity.=0A---=0A=20lisp/progmodes/compile.el=20|=20= 18=20+++++++++++++++++-=0A=201=20file=20changed,=2017=20insertions(+),=20= 1=20deletion(-)=0A=0Adiff=20--git=20a/lisp/progmodes/compile.el=20= b/lisp/progmodes/compile.el=0Aindex=2048ac85a73b..65c2978c9e=20100644=0A= ---=20a/lisp/progmodes/compile.el=0A+++=20b/lisp/progmodes/compile.el=0A= @@=20-273,7=20+273,23=20@@=20compilation-error-regexp-alist-alist=0A=20=20= =20=20=20;;=20due=20to=20matching=20filenames=20via=20\\(.*?\\).=20=20= This=20might=20be=20faster.=0A=20=20=20=20=20(maven=0A=20=20=20=20=20=20= ;;=20Maven=20is=20a=20popular=20free=20software=20build=20tool=20for=20= Java.=0A-=20=20=20=20=20"\\(\\[WARNING\\]=20*\\)?\\([^=20\n]\\(?:[^\n=20= :]\\|=20[^-/\n]\\|:[^=20\n]\\)*?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\]=20"=20= 2=203=204=20(1))=0A+=20=20=20=20=20,(rx=20bol=0A+=20=20=20=20=20=20=20=20= =20=20(?=20(*=20"=20")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20"["=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20(or=20"ERROR"=20(group-n=201=20= "WARNING")=20(group-n=202=20"INFO"))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20"]"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20(+=20"=20"))=0A+=20=20= =20=20=20=20=20=20=20=20(group-n=203=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(not=20(any=20"\n=20"))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(*=20(|=20(not=20(any=20"\n=20:"))=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (:=20"=20"=20(not=20(any=20"\n/-")))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(:=20":"=20(not=20(any=20"\n=20= ["))))))=0A+=20=20=20=20=20=20=20=20=20=20":["=0A+=20=20=20=20=20=20=20=20= =20=20(group-n=204=20(+=20digit))=0A+=20=20=20=20=20=20=20=20=20=20","=0A= +=20=20=20=20=20=20=20=20=20=20(group-n=205=20(+=20digit))=0A+=20=20=20=20= =20=20=20=20=20=20"]=20")=0A+=20=20=20=20=203=204=205=20(1=20.=202))=0A=20= =0A=20=20=20=20=20(jikes-line=0A=20=20=20=20=20=20"^=20*\\([0-9]+\\)\\.[=20= \t]+.*\n=20+\\(<-*>\n\\*\\*\\*=20\\(?:Error\\|Warnin\\(g\\)\\)\\)"=0A--=20= =0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_F14DADC2-22DC-4C61-84E2-9CFC7CACE475 Content-Disposition: attachment; filename=0002-Speed-up-msft-and-watcom-compilation-error-regexps.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0002-Speed-up-msft-and-watcom-compilation-error-regexps.patch" Content-Transfer-Encoding: quoted-printable =46rom=205d749520ddde466fd8ae5412ace567a7e6cc313b=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=2014=20Feb=202020=2023:38:24=20+0100=0A= Subject:=20[PATCH=202/2]=20Speed=20up=20'msft'=20and=20'watcom'=20= compilation=20error=20regexps=0A=0AThey=20have=20similar=20structure,=20= and=20both=20suffer=20from=20being=20able=20to=0Amatch=20leading=20= spaces=20in=20multiple=20ways=20which=20leads=20to=20bad=20performance=0A= when=20backtracking=20(bug#39595).=0A=0A*=20lisp/progmodes/compile.el=20= (compilation-error-regexp-alist-alist):=0AImproved=20'msft'=20and=20= 'watcom'=20regexps.=0A---=0A=20lisp/progmodes/compile.el=20|=204=20++--=0A= =201=20file=20changed,=202=20insertions(+),=202=20deletions(-)=0A=0Adiff=20= --git=20a/lisp/progmodes/compile.el=20b/lisp/progmodes/compile.el=0A= index=2065c2978c9e..79d2293e21=20100644=0A---=20= a/lisp/progmodes/compile.el=0A+++=20b/lisp/progmodes/compile.el=0A@@=20= -221,7=20+221,7=20@@=20compilation-error-regexp-alist-alist=0A=20=20=20=20= =20=20;;=20considered=20before=20EDG.=0A=20=20=20=20=20=20;;=20The=20= message=20may=20be=20a=20"warning",=20"error",=20or=20"fatal=20error"=20= with=0A=20=20=20=20=20=20;;=20an=20error=20code,=20or=20"see=20= declaration=20of"=20without=20an=20error=20code.=0A-=20=20=20=20=20"^=20= *\\([0-9]+>\\)?\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\))=20?\=0A+=20= =20=20=20=20"^=20*\\([0-9]+>\\)?\\(\\(?:[a-zA-Z]:\\)?[^=20= :(\t\n][^:(\t\n]*\\)(\\([0-9]+\\))=20?\=0A=20:=20\\(?:see=20= declaration\\|\\(?:warnin\\(g\\)\\|[a-z=20]+\\)=20C[0-9]+:\\)"=0A=20=20=20= =20=20=202=203=20nil=20(4))=0A=20=0A@@=20-459,7=20+459,7=20@@=20= compilation-error-regexp-alist-alist=0A=20=20=20=20=20=20"^\\([^,=20= \n\t]+\\),=20line=20\\([0-9]+\\),=20char=20\\([0-9]+\\)[:.,=20(-]"=201=20= 2=203)=0A=20=0A=20=20=20=20=20(watcom=0A-=20=20=20=20=20"^[=20= \t]*\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)):=20?\=0A+=20=20=20=20= =20"^[=20\t]*\\(\\(?:[a-zA-Z]:\\)?[^=20= :(\t\n][^:(\t\n]*\\)(\\([0-9]+\\)):=20?\=0A=20\\(?:\\(Error!=20= E[0-9]+\\)\\|\\(Warning!=20W[0-9]+\\)\\):"=0A=20=20=20=20=20=201=202=20= nil=20(4))=0A=20=0A--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_F14DADC2-22DC-4C61-84E2-9CFC7CACE475--