From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24012: 25.0.95; forward-comment backwards takes O(n^2) Date: Sun, 17 Jul 2016 15:12:01 +0300 Message-ID: <83poqc4g6m.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1468757604 9426 80.91.229.3 (17 Jul 2016 12:13:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Jul 2016 12:13:24 +0000 (UTC) Cc: 24012@debbugs.gnu.org To: Leo Liu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 17 14:13:13 2016 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 1bOkwa-0005GJ-Tu for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Jul 2016 14:13:13 +0200 Original-Received: from localhost ([::1]:41394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOkwa-0001Q1-0Y for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Jul 2016 08:13:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOkwU-0001Ge-33 for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2016 08:13:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bOkwQ-0004hl-Q5 for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2016 08:13:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOkwQ-0004hh-Mv for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2016 08:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bOkwQ-00038M-Fn for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2016 08:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Jul 2016 12:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24012 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24012-submit@debbugs.gnu.org id=B24012.146875754011990 (code B ref 24012); Sun, 17 Jul 2016 12:13:02 +0000 Original-Received: (at 24012) by debbugs.gnu.org; 17 Jul 2016 12:12:20 +0000 Original-Received: from localhost ([127.0.0.1]:54324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOkvk-00037J-9Q for submit@debbugs.gnu.org; Sun, 17 Jul 2016 08:12:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50227) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOkvi-000376-Gn for 24012@debbugs.gnu.org; Sun, 17 Jul 2016 08:12:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bOkva-0004Y9-AO for 24012@debbugs.gnu.org; Sun, 17 Jul 2016 08:12:13 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOkva-0004Xu-7N; Sun, 17 Jul 2016 08:12:10 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1939 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bOkvY-0005Hv-8F; Sun, 17 Jul 2016 08:12:08 -0400 In-reply-to: (message from Leo Liu on Sun, 17 Jul 2016 19:04:18 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:121165 Archived-At: > From: Leo Liu > 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?