all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 24012@debbugs.gnu.org, Leo Liu <sdl.web@gmail.com>
Subject: bug#24012: 25.0.95; forward-comment backwards takes O(n^2)
Date: Sun, 29 Sep 2019 07:15:22 +0200	[thread overview]
Message-ID: <CADwFkm=FES=wxGGZqEq8t=dhWTWgGS4iTjvjmttrcBvF=sc4Lw@mail.gmail.com> (raw)
In-Reply-To: <m1h9boh6fh.fsf@gmail.com>

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 7/17/16 2:04 PM, Leo Liu wrote:
>> 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.
>
> FWIW, it looks fixed in the master branch now.
>
> Probably by 14b95587520959c5b54356547a0a69932a9bb480, so no idea what exactly
> was causing it.

Indeed.  I only see O(n) on current master -- that is, if I use the
source code from the original report, and double the amount of lines
by C-x h M-w C-y, the time to evaluate this expression in a buffer
only doubles:

    (progn (end-of-buffer) (forward-comment (- (point))))

Leo, are you still seeing this issue?  If I don't hear back within a
couple of weeks, I'll just assume that this has been fixed and close
this bug.

Best regards,
Stefan Kangas





  parent reply	other threads:[~2019-09-29  5:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-17 11:04 bug#24012: 25.0.95; forward-comment backwards takes O(n^2) Leo Liu
2016-07-17 12:12 ` Eli Zaretskii
2016-07-18  0:15   ` Leo Liu
2016-07-18  2:36     ` Eli Zaretskii
2016-07-18  3:05       ` Leo Liu
2016-07-18 14:34         ` Eli Zaretskii
2016-07-17 13:39 ` Andreas Röhler
2017-12-25 15:24 ` Dmitry Gutov
2019-09-29  5:15 ` Stefan Kangas [this message]
2019-11-08  3:59   ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkm=FES=wxGGZqEq8t=dhWTWgGS4iTjvjmttrcBvF=sc4Lw@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=24012@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=sdl.web@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.