all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: ynyaaa@gmail.com
Cc: 26051@debbugs.gnu.org
Subject: bug#26051: 25.1; overlays may make emacs very slow
Date: Fri, 10 Mar 2017 19:02:59 +0200	[thread overview]
Message-ID: <83pohpdpz0.fsf@gnu.org> (raw)
In-Reply-To: <87varh3xql.fsf@gmail.com> (ynyaaa@gmail.com)

> From: ynyaaa@gmail.com
> Date: Sat, 11 Mar 2017 01:25:22 +0900
> 
> 
> Evaluating the form below in the *scratch* buffer,
> it takes a few seconds to show the result.
> 
> (let ((n 65536))
>   (save-excursion (dotimes (i n) (insert (format "%d\n" i))))
>   (dotimes (i n) (make-overlay (point) (progn (forward-line) (point))))
>   (message "Done."))
> 
> If I evaluate the form as below, it takes about 30 seconds.
>   (1) switch to a newly created buffer
>   (2) insert the code into the buffer
>   (3) insert 2 line breaks after the last closing parenthesis
>   (4) type C-x C-e
> 
> If I evaluate the form as below, it takes about 10 minutes.
>   (1) switch to a newly created buffer
>   (2) type M-: and input the code
> 
> In each case, the message "Done." is displayed in a few seconds.
> But it takes a long time to display the buffer contents.

The overlays is not the main problem here, the main problem is that
your buffer is made of digits, which are neutral characters for the
bidirectional display, so it needs to work much harder.  Compare with
this:

  (let ((n 65536))
    (save-excursion (dotimes (i n) (insert (format "a%d\n" i))))
    (dotimes (i n) (make-overlay (point) (progn (forward-line) (point))))
    (message "Done."))

I see no bugs here, just known issues/limitations of the current
display engine.





  reply	other threads:[~2017-03-10 17:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10 16:25 bug#26051: 25.1; overlays may make emacs very slow ynyaaa
2017-03-10 17:02 ` Eli Zaretskii [this message]
2017-03-11  4:22 ` ynyaaa
2017-03-11  6:59   ` Eli Zaretskii
2017-03-12  1:44     ` ynyaaa
2017-03-12 15:47       ` Eli Zaretskii
2017-03-13 11:18         ` ynyaaa
2017-03-13 11:29           ` Andreas Politz
2017-03-13 15:54             ` Eli Zaretskii

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=83pohpdpz0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=26051@debbugs.gnu.org \
    --cc=ynyaaa@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.