Subject: bug#2056: 23.0.60; Enabling flyspell degrades performance

From: Ian Eure <[email-masked]>
Date: Fri, 17 Apr 2009 15:42:07 -0700

On Apr 16, 2009, at 11:54 AM, Chong Yidong wrote:

> Dan Nicolaescu <[email-masked]> wrote:
>
>> Following the recipe from bug#2717 on GNU/Linux shows a slowdown for
>> me too.
>
> Turns out that the flyspell's sgml-mode-specific function,
> sgml-mode-flyspell-verify, was quite sloppily written (among other
> things, it was leaking markers).  I've checked in a version that is  
> much
> faster.  The slowdown observed with sgml-mode + flyspell should be  
> gone
> now.  This solves bug#2717.
>
> However, there appears to be a slowdown still present on Mac OS.
>
> In bug#2056, Ian Eure claims that there is a slowdown for all major
> modes (observed on Mac OS), and in bug#2503 Leo observes a slowdown
> (also observed on Mac OS).
>
This change has no effect on the performance issue I see.

> Adrian, these may be related to how the NS port handles processes, or
> tool bar update, or something along these lines.  Can you see if you  
> can
> reproduce it?

The NS port seems to be very slow generally. For example, faces seem  
to be extremely slow to paint/refresh. You can see this:

  1. M-x sql-sqlite RET /tmp/foo.sqlite3 RET
  2. C-x 4 b *sql* RET
  3. M-x sql-mode RET
  4. Enter this query:
CREATE TABLE `foo` (
     `id` integer primary KEY
);

  5. C-x h C-w
  6. C-x o C-y RET

Now place the mouse pointer over the query in the sqli buffer. The  
input is highlighted with a green background. This is so slow to draw  
that you can see it being painted line by line. If you type in the  
buffer with the pointer over the text, it erases and redraws the  
highlight with every key press.

It's really terrible, but it might be beyond the scope of this  
specific issue.

  - Ian