GNU bug report logs - #18013
looking-back is inefficient

Previous Next

Package: emacs;

Reported by: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>

Date: Mon, 14 Jul 2014 09:48:02 UTC

Severity: minor

Tags: wontfix

Found in version 24.3.92

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #24 received at 18013 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> suse.de>
To: Kevin Rodgers <kevin.d.rodgers <at> gmail.com>
Cc: 18013 <at> debbugs.gnu.org
Subject: Re: 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
Kevin Rodgers <kevin.d.rodgers <at> gmail.com> 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 <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




This bug report was last modified 8 years and 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.