GNU bug report logs - #24012
25.0.95; forward-comment backwards takes O(n^2)

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Sun, 17 Jul 2016 11:05:02 UTC

Severity: normal

Found in version 25.0.95

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 24012 <at> debbugs.gnu.org
Subject: Re: bug#24012: 25.0.95; forward-comment backwards takes O(n^2)
Date: Sun, 17 Jul 2016 15:12:01 +0300
> From: Leo Liu <sdl.web <at> gmail.com>
> Date: Sun, 17 Jul 2016 19:04:18 +0800
> 
> 1. Use the attached file as an example, open it in emacs in ruby-mode
> 2. Move point to end of buffer and eval (forward-comment (- (point)))
> 
> The last step takes about 0.25 seconds on my MacBook 3 GHz Intel Core
> i7. If you double the lines of comments, the time increase by 4 folds.
> 
> Any idea why forward-comment backwards is so slow?

Because search functions cannot really search backwards?




This bug report was last modified 5 years and 197 days ago.

Previous Next


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