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

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

bug#13675: Extremely slow redisplay when lines are very long


From: Phil Sainty
Subject: bug#13675: Extremely slow redisplay when lines are very long
Date: Sat, 21 Oct 2017 00:57:43 +1300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 20/10/17 19:44, Eli Zaretskii wrote:
> What mode/kind of file needs font lock and has such long lines?

The common cases I would run into were with 'minified' files of
programming code, where as much whitespace as possible has been
removed to reduce the file size.

e.g. Things like https://code.jquery.com/jquery-git.min.js

That kind of file is not intended to be edited by hand, but so
far as Emacs is concerned it's just a regular javascript file,
and therefore font-lock and all the other modes which would be
enabled for editing javascript will be used.


> Patches for presenting a warning for such files, like we do with
> very large files, are welcome.

FWIW I wrote https://savannah.nongnu.org/projects/so-long which
tries to avoid performance issues in buffers with unexpectedly
long lines by automatically changing the major mode and disabling
various minor modes for that buffer (based on a pre-configured
list).

It can only address certain classes of problem, mind, and it
needs some more work (and has been waiting for me to get back
to it); but it more or less does what it's intended to do, so
others might find it useful as-is (I certainly use it myself).

See https://www.emacswiki.org/emacs/SoLong for more information.


-Phil





reply via email to

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