From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.devel Subject: Re: Documentation on debugging regexp performance Date: Thu, 21 Jan 2016 12:42:40 +0100 Message-ID: <85r3hbqczc.fsf@iznogoud.viz> References: <56A06CD6.2090707@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1453382882 26558 80.91.229.3 (21 Jan 2016 13:28:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Jan 2016 13:28:02 +0000 (UTC) Cc: Emacs developers To: =?utf-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 21 14:27:54 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aMFHC-0001Bd-NM for ged-emacs-devel@m.gmane.org; Thu, 21 Jan 2016 14:27:50 +0100 Original-Received: from localhost ([::1]:47622 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMFHB-0001ee-RL for ged-emacs-devel@m.gmane.org; Thu, 21 Jan 2016 08:27:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMFH8-0001eY-Ij for emacs-devel@gnu.org; Thu, 21 Jan 2016 08:27:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMFH5-0005Bj-Bb for emacs-devel@gnu.org; Thu, 21 Jan 2016 08:27:46 -0500 Original-Received: from b2bfep16.mx.upcmail.net ([62.179.121.61]:56907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMFH4-0005AA-Vl for emacs-devel@gnu.org; Thu, 21 Jan 2016 08:27:43 -0500 Original-Received: from edge12.upcmail.net ([192.168.13.82]) by b2bfep16.mx.upcmail.net (InterMail vM.8.01.05.18 201-2260-151-151-20140610) with ESMTP id <20160121132737.TNJP5368.b2bfep16-int.chello.at@edge12.upcmail.net> for ; Thu, 21 Jan 2016 14:27:37 +0100 Original-Received: from iznogoud.viz ([91.119.212.206]) by edge12.upcmail.net with edge id 8dTc1s00a4TkxQj0CdTcxs; Thu, 21 Jan 2016 14:27:37 +0100 X-SourceIP: 91.119.212.206 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1aMFGy-0000iY-3d; Thu, 21 Jan 2016 14:27:36 +0100 Mail-Followup-To: =?utf-8?Q?Cl=C3=A9ment?= Pit--Claudel , Emacs developers User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (berkeley-unix) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 62.179.121.61 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:198494 Archived-At: On Thu, Jan 21 2016, Cl=C3=A9ment Pit--Claudel wrote: > I'm running into a surprising regular expressions issue. I have attached = a file (~50k) in which (re-search-forward " +[^:=3D]+ +:=3D?") seems to b= e extremely slow. (I killed it after 30 seconds). Truncating the file to it= s first 20 lines reduces the time for re-search-forward to about a second, = which is still extremely slow.=20 Perhaps you meant (re-search-forward " +[^:=3D\n]+ +:=3D?") Cf. (info "(elisp) Regexp Special"), in particular the section about "complemented character alternative".