Subject: bug#15876: 24.3.50; Highly degraded performance between rev 114715 and 115006

From: Eli Zaretskii <[email-masked]>
Date: Wed, 20 Nov 2013 05:53:36 +0200

> From: Stefan Monnier <[email-masked]>
> Date: Tue, 19 Nov 2013 20:47:52 -0500
> Cc: [email-masked]
> 
> > --8<---------------cut here---------------start------------->8---
> > ;; highlight trailing whitespaces in all modes
> > (setq-default show-trailing-whitespace t)
> > --8<---------------cut here---------------end--------------->8---
> 
> Can you try to compare the performance of revision 114849 and
> revision 114848?  The difference between the two is that the region
> highlighting was moved from C to Elisp.  This usually shouldn't affect
> performance, but maybe there's some interaction with redisplay
> that ends up disabling most optimizations?

The old region highlighting code was also an optimization killer.
Besides, no disabled optimizations should ever have such a terrible
effect.  It's most probably a bug.