From: ynyaaa@gmail.com
To: Eli Zaretskii <eliz@gnu.org>
Cc: 26051@debbugs.gnu.org
Subject: bug#26051: 25.1; overlays may make emacs very slow
Date: Mon, 13 Mar 2017 20:18:55 +0900 [thread overview]
Message-ID: <87inndqva8.fsf@gmail.com> (raw)
In-Reply-To: <83fuiicx98.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 12 Mar 2017 17:47:47 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
> My guess is because we need to compute the byte position of the
> markers that store the overlay's beginning and end. But that's just a
> guess.
I tested with markers.
Markers make emacs slow too(a little bit faster than overlays).
M-x occur may make a buffer have thousands of markers,
and make point motion commands slow.
(benchmark
1
'(with-temp-buffer
(let ((n 65536))
(save-excursion (dotimes (i n) (insert (format "\u00E1%d\n" i))))
(dotimes (i n) (make-overlay (point) (point)) (forward-line)))))
=>"Elapsed time: 129.815000s (0.277000s in 17 GCs)"
(benchmark
1
'(with-temp-buffer
(let ((n 65536) tmp)
(save-excursion (dotimes (i n) (insert (format "\u00E1%d\n" i))))
(dotimes (i n)
;; protect against garbage collection
(setq tmp (cons (list (point-marker) (point-marker)) tmp))
(forward-line)))))
=>"Elapsed time: 90.038000s (0.272000s in 16 GCs)"
> Btw, your original recipe will produce a much faster redisplay if you
> set bidi-paragraph-direction of the buffer to left-to-right, instead
> of leaving it at its default nil value. Sorry I didn't mention this
> earlier.
It is a good solution for me, thanks.
next prev parent reply other threads:[~2017-03-13 11:18 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
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 [this message]
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=87inndqva8.fsf@gmail.com \
--to=ynyaaa@gmail.com \
--cc=26051@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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.