bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40007: 28.0.50; Emacs gets very slow when displaying a long line


From: Phil Sainty
Subject: bug#40007: 28.0.50; Emacs gets very slow when displaying a long line
Date: Tue, 24 Mar 2020 21:49:19 +1300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 10/03/20 11:46 pm, Pieter van Oostrum wrote:
> Jan Synacek <jsynacek@redhat.com> writes:
>
>> 1) emacs -Q
>> 2) M-x shell
>> 3) execute a program that displays a single line, about ~193000
>> characters long
>
> Use so-long-mode.

For clarity, global-so-long-mode isn't going to help with that
recipe, because it doesn't try to detect the *dynamic* creation of
very long lines.  It only cares about visiting files.

In principle it can be employed successfully in other situations,
but for now it's up to users to target such things explicitly.
E.g.:
https://www.reddit.com/r/emacs/comments/ccoksw/solong_mitigating_slowness_due_to_extremely_long/etpi51l/

Note that you probably shouldn't invoke major mode so-long-mode in
a shell-mode buffer, but so-long-minor-mode could help somewhat if
it were enabled.  I think only slightly, though -- in this instance
you'll end up with the *end* of a very long line on display, and so
performance is going to be fairly poor regardless.  Certainly in my
test it didn't make a dramatic difference.  (The really major
benefits of so-long are in preventing certain serious problems
which can occur even when only the start of the line is visible,
and in those situations the improvements can be extremely good.)

As Eli says, the library alleviates some of the problems -- but
only some of them.


-Phil






reply via email to

[Prev in Thread] Current Thread [Next in Thread]