Subject: Re: bug#23801: 25.0.95; term.el redraws extremely slow with bidi support enabled, and large buffers

From: Eli Zaretskii <[email-masked]>
Date: Tue, 21 Jun 2016 21:47:32 +0300

> From: Phil Sainty <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>
> Date: Tue, 21 Jun 2016 02:35:46 +1200
> 
> emacs -Q (and maximise the terminal or GUI frame)
> M-x term (and run a shell)
> printf "%10000s" x
> 
> (to insert an 'x' preceded by 9,999 spaces.)
> 
> That's not as obvious without a background colour, but we can
> provide that easily enough:
> 
> printf "\033[41m%10000s\033[47m" x
> 
> (Drawing in red, and reverting to a white background. Use 40m
> in the final sequence if you need to revert to black instead.)
> 
> 
> Bash supports numeric prefix arguments for repetition just like
> Emacs, so you can also insert lots of spaces like so:
> 
> M-10000 SPC
> 
> You can insert 1,000 TABs with:
> M-1000 C-v C-i
> 
> 
> With this approach we are entering (but not yet submitting) a
> command, and I further note that using C-u at this point to erase
> our input is also really slow to complete -- but again, only when
> it is whitespace being 'erased'.
> 
> e.g. M-10000 x C-u is perfectly speedy.

Can you try this in an Emacs built from the latest master branch of
the Emacs Git repository?  It could be that the current development
sources already provide improvement in these cases.