From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#18013: 24.3.92; looking-back "[^\n]" taking a lot of time in large buffers Date: Tue, 15 Jul 2014 09:21:12 +0200 Message-ID: References: <87oaws9sp2.fsf@geodiff-mac3.ulb.ac.be> <878unw9ot9.fsf_-_@geodiff-mac3.ulb.ac.be> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1405408945 12793 80.91.229.3 (15 Jul 2014 07:22:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jul 2014 07:22:25 +0000 (UTC) Cc: 18013@debbugs.gnu.org To: Kevin Rodgers Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 15 09:22:17 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1X6x45-00005H-Gj for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Jul 2014 09:22:17 +0200 Original-Received: from localhost ([::1]:33382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6x45-0003Hl-0D for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Jul 2014 03:22:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6x3x-0003Gf-3F for bug-gnu-emacs@gnu.org; Tue, 15 Jul 2014 03:22:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6x3q-0004J5-TZ for bug-gnu-emacs@gnu.org; Tue, 15 Jul 2014 03:22:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6x3q-0004J1-Q7 for bug-gnu-emacs@gnu.org; Tue, 15 Jul 2014 03:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X6x3q-0008Id-7i for bug-gnu-emacs@gnu.org; Tue, 15 Jul 2014 03:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Jul 2014 07:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18013 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18013-submit@debbugs.gnu.org id=B18013.140540887631835 (code B ref 18013); Tue, 15 Jul 2014 07:22:02 +0000 Original-Received: (at 18013) by debbugs.gnu.org; 15 Jul 2014 07:21:16 +0000 Original-Received: from localhost ([127.0.0.1]:55242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X6x35-0008HP-KV for submit@debbugs.gnu.org; Tue, 15 Jul 2014 03:21:15 -0400 Original-Received: from cantor2.suse.de ([195.135.220.15]:52440 helo=mx2.suse.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X6x33-0008HE-8L for 18013@debbugs.gnu.org; Tue, 15 Jul 2014 03:21:14 -0400 Original-Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7F6E4AC47; Tue, 15 Jul 2014 07:21:12 +0000 (UTC) X-Yow: --Hello, POLICE? I"ve got ABBOTT & COSTELLO here on suspicion of HIGHWAY ROBBERY!! In-Reply-To: (Kevin Rodgers's message of "Tue, 15 Jul 2014 00:08:01 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91557 Archived-At: Kevin Rodgers writes: > On 7/14/14 5:12 AM, Nicolas Richard wrote: >> As you see it takes more than 8 seconds on my system, most of that time >> is spent looking-back (inserting the file is quick). >> >> (looking-back "[^\n]") is bad code, so I totally deserve this. Still, is >> it possible to make the search smarter when the match is supposed to be >> "anchored" at point ? Otherwise let's just close this bug. > > Use "\\=" to match the empty string at point. That's what looking-back does. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."