Subject: bug#44818: 27.0.91; wedged

From: Devon Sean McCullough <[email-masked]>
Date: Tue, 1 Dec 2020 06:32:25 -0500

On 27/11/2020 00:40, Richard Stallman wrote:
> 
>    > Will "so long" catch spammed shells?
> 
> Could you explain the problem you're worried about?
> What is the scenario?

REPL & shell output sometimes wedge redisplay
when lines are very long, same as with files.

		Peace
			--Devon

P.S.  Redisplay should never take > 50 ms.
Perhaps it would have completed in 51 ms
but usually it takes minutes, hours,
days or weeks to complete, running
at 100% CPU with fans roaring.

Rather than set a fifty millisecond timer,
maybe users should be allowed to ^G quit
into a degraded state.  The only other
choice is to force kill the editor
and hope for auto save files.

P.P.S.  When Emacs becomes unresponsive,
i.e., user input is ignored for a while,
could some helpful options be offered,
e.g., redisplay-friendly overlays?

P.P.P.S.  I instrumented a typical scenario.  Emacs went dead
for only 5.6 minutes with point at EoB but when at the middle
of the file, it was unresponsively burning CPU for an hour or
so until I got tired of the fan noise and force-quit the app:
     emacs-version "27.1"
	For information about GNU Emacs and the GNU system, type C-h C-a.
	2841.861010 ms to evaluate (insert-file-contents-literally file)
	0.010967 ms to evaluate (goto-char (point-max)) => 248867275
	0.025988 ms to evaluate (switch-to-buffer buffer)
	336605.978966 ms to evaluate (redisplay 1) => t
	0.002861 ms to evaluate (backward-char) => nil
	0.086069 ms to evaluate (redisplay 2) => t
	0.002861 ms to evaluate (backward-char) => nil
	0.063896 ms to evaluate (redisplay 3) => t
⋮