Subject: Re: bug#38407: 27.0.50; infinite loop with display of large file without newlines

From: Phil Sainty <[email-masked]>
Date: Sat, 30 Nov 2019 00:48:22 +1300

I've just pulled from master and recompiled, and in my own tests
setting bidi-inhibit-bpa to t improves performance greatly.

On my machine, with the particular extensions.json file I'm using:

* In js-mode, scrolling at the end of the file incurs a ~6s delay.

* In so-long-mode (without bidi-inhibit-bpa), the same thing incurs a
  ~5s delay -- not much of an improvement.

* After setting bidi-inhibit-bpa to t in so-long-variable-overrides
  and revisiting the file, the same thing incurs only a ~1s delay.

* Using M-: (setq-local bidi-inhibit-bpa t) in json-mode (i.e. without
  using so-long) likewise makes things a great deal faster (but the
  combination with so-long is better still).

Scrolling at the top of the file in so-long-mode with the new option
set is more or less instantaneous.  Without the new option that is
also quite slow (if not to the same extent as the end of the file).

In short, this enhancement seems very effective to me (thank you Eli),
so I will push the addition to so-long.el shortly.

-Phil