Subject: bug#20266: Emacs doesn't respond when editing the attached c header file.

From: 张海君 <[email-masked]>
Date: Sun, 12 Apr 2015 10:15:15 +0800

> 在 2015年4月7日，23:16，Alan Mackenzie <[email-masked]> 写道：
> 
> Hello, Netjune.
> 
> In article <[email-masked]> you wrote:
>> [-- text/plain, encoding 7bit, charset: us-ascii, 13 lines --]
> 
>> Emacs doesn't respond when editing the attached c header file.
>> Emacs version: 24.4.
> 
>> ------------------------------------
>> Run emacs with "emacs -Q test.h".
>> M-x mark-whole-buffer
>> M-x kill-ring-save
>> M-x end-of-buffer
>> M-x yank
>> Then emacs doesn't respond for about 5 seconds.
>> M-x scroll-down-command. 
>> Then emacs doesn't respond for about 5 seconds too.
> 
> Yes.  This isn't good at all.
> 
>> M-x scroll-down-command.
>> Then emacs doesn't respond for about 5 seconds too.
> 
> I can't actually reproduce this delay.

Try do it more than 4 times, like: M-> M-v M-v M-v M-v M-v.
The delay often happens at the first M-v, but not always.
The delay is about 5 seconds on mac OSX (cpu: 1.4GHz), and is about 2 seconds on linux (cpu: 2.53Ghz).

Or try to input some text (like newline chars) at the end of buffer.
I input a newline at the end of buffer, and emacs didn't respond about 2 seconds on linux.

After apply the patch, there is no delay after yank.