GNU bug report logs -
#26051
25.1; overlays may make emacs very slow
Previous Next
Reported by: ynyaaa <at> gmail.com
Date: Fri, 10 Mar 2017 16:26:02 UTC
Severity: minor
Merged with 2963
Found in version 25.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 26051 <at> debbugs.gnu.org (full text, mbox):
> From: ynyaaa <at> 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.
This bug report was last modified 1 year and 210 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.