GNU bug report logs - #2056
23.0.60; Enabling flyspell degrades performance

Previous Next

Packages: ns, emacs;

Reported by: Ian Eure <ian <at> digg.com>

Date: Sun, 25 Jan 2009 19:15:05 UTC

Severity: important

Merged with 2639, 4273, 5133, 12127

Found in version 24.1.50

Fixed in version 24.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2056 in the body.
You can then email your comments to 2056 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Sun, 25 Jan 2009 19:15:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ian Eure <ian <at> digg.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 25 Jan 2009 19:15:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Ian Eure <ian <at> digg.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; Enabling flyspell degrades performance
Date: Sun, 25 Jan 2009 11:08:14 -0800
If you enable flyspell-mode in a buffer, Emacs gets slow. Not
unbearably slow, but there's a distinct lag when you type. It seems to
get worse as the buffer gets larger.

Other people have noticed:
http://www.nabble.com/CVS-version:-message-mode-%2B-flyspell-terribly-slow-td20666831.html

The behavior doesn't happen on Emacs 22.

In GNU Emacs 23.0.60.1 (i386-apple-darwin9.6.0, NS
apple-appkit-949.43)
 of 2009-01-20 on neutron.local
Windowing system distributor `Apple', version 10.3.949
configured using `configure  '--with-ns''

Important settings:
  value of $LC_ALL:
  value of $LC_COLLATE: en_US.UTF-8
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: VC dir

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
S u b s e q u e n t SPC c o m m a n d s SPC f a i l
SPC t o SPC r u n , SPC M-b M-b M-b o n SPC t h e SPC
d i r e d SPC b u f f e r SPC C-e C-n s i n c e SPC
t h e y SPC p a s s SPC a SPC n o n e s i <backspace>
<backspace> x i s t e n t SPC p a t h SPC t o SPC g
i t . <return> <return> M-` M-` T h e SPC i s s u e
SPC s e e m s SPC t o SPC b e SPC t h a t SPC <switch-frame>
<switch-frame> v c - d i r e d SPC u s <backspace>
<backspace> c a l l s SPC g i t SPC d i g g - <backspace>
<backspace> <backspace> f f - i n d e x , SPC w h i
c h SPC s h o w s SPC a l l SPC p a t h s SPC r e l
a t i v e SPC t o SPC t h e SPC W C SPC r o o t SPC
r a t h e r SPC t h a n SPC t h e SPC P W D . M-b C-d
C C-e SPC T h i s SPC l e a d s SPC t o SPC o n <backspace>
<backspace> <M-backspace> <M-backspace> <M-backspace>
<backspace> C-n C-x C-o C-v C-v C-v C-s t SPC i SPC
n SPC y C-n C-p M-< C-c C-c y e s <return> <switch-frame>
<switch-frame> <help-echo> <menu-bar> <help-menu>
<send-emacs-bug-report>

Recent messages:
Mark set
Undo!
Mark set
Auto-saving...done
tmm-prompt: Command attempted to use minibuffer while in minibuffer
Quit
Auto-saving...done
Mark saved where search started
Mark set
Sending...done




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Fri, 30 Jan 2009 12:20:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Agustin Martin <agustin.martin <at> hispalinux.es>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 30 Jan 2009 12:20:03 GMT) Full text and rfc822 format available.

Message #10 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Agustin Martin <agustin.martin <at> hispalinux.es>
To: Ian Eure <ian <at> digg.com>, 2056 <at> debbugs.gnu.org
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Fri, 30 Jan 2009 13:11:49 +0100
On Sun, Jan 25, 2009 at 11:08:14AM -0800, Ian Eure wrote:
> If you enable flyspell-mode in a buffer, Emacs gets slow. Not
> unbearably slow, but there's a distinct lag when you type. It seems to
> get worse as the buffer gets larger.
>
> Other people have noticed:
> http://www.nabble.com/CVS-version:-message-mode-%2B-flyspell-terribly-slow-td20666831.html

That points to a thread in emacs-devel list,

http://lists.gnu.org/archive/html/emacs-devel/2008-11/msg00859.html
http://thread.gmane.org/gmane.emacs.devel/106090/focus=106118

> The behavior doesn't happen on Emacs 22.

Is the same problem described there? Does disabling the tool-bar make this
slowness disappear? Note that, after above threads, some improvements were
done on this at the end of November.

-- 
Agustin




Merged 2056 2503. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sat, 28 Feb 2009 01:50:03 GMT) Full text and rfc822 format available.

Merged 2056 2503 2639. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Wed, 11 Mar 2009 19:50:03 GMT) Full text and rfc822 format available.

Merged 2056 2503 2639 2717. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Thu, 19 Mar 2009 16:50:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Thu, 26 Mar 2009 21:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ian Eure <ian <at> digg.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 26 Mar 2009 21:30:02 GMT) Full text and rfc822 format available.

Message #21 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Ian Eure <ian <at> digg.com>
To: Agustin Martin <agustin.martin <at> hispalinux.es>
Cc: 2056 <at> debbugs.gnu.org
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Thu, 26 Mar 2009 14:22:22 -0700
On Jan 30, 2009, at 4:11 AM, Agustin Martin wrote:

> On Sun, Jan 25, 2009 at 11:08:14AM -0800, Ian Eure wrote:
>> If you enable flyspell-mode in a buffer, Emacs gets slow. Not
>> unbearably slow, but there's a distinct lag when you type. It seems  
>> to
>> get worse as the buffer gets larger.
>>
>> Other people have noticed:
>> http://www.nabble.com/CVS-version:-message-mode-%2B-flyspell-terribly-slow-td20666831.html
>
> That points to a thread in emacs-devel list,
>
> http://lists.gnu.org/archive/html/emacs-devel/2008-11/msg00859.html
> http://thread.gmane.org/gmane.emacs.devel/106090/focus=106118
>
>> The behavior doesn't happen on Emacs 22.
>
> Is the same problem described there? Does disabling the tool-bar  
> make this
> slowness disappear? Note that, after above threads, some  
> improvements were
> done on this at the end of November.
>

I'm not sure if it is or not. I don't notice any difference with the  
toolbar enabled or disabled. I keep it disabled by default.

It happens with the NS port. I haven't tried GTK+ / Xaw. It doesn't  
seem to happen if I run Emacs in a terminal. If I launch NS Emacs,  
then connect to it with emacsclient, I still get the problem. It  
happens whether the buffer is visible on the text frame, the GUI  
frame, or both.

It occurs when flyspell-mode is enabled in any buffer. The major mode  
doesn't matter.

It recently got mush worse, to the point where I must disable flyspell  
in erc-mode to maintain my sanity. I suspect it was the 2009-03-14  
commits to src/nsterm.m src/nsfont.m etc.

 - Ian




Severity set to `serious' from `normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Thu, 02 Apr 2009 06:55:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Mon, 13 Apr 2009 23:55:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 13 Apr 2009 23:55:05 GMT) Full text and rfc822 format available.

Message #28 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: 2056 <at> debbugs.gnu.org
Subject: Re: 23.0.60; Enabling flyspell degrades performance
Date: Tue, 14 Apr 2009 00:48:58 +0100
Hi there,

I'd like to point out that with turn-on-flyspell added to
text-mode-hook. M-x report-emacs-bug will take 9.8 seconds to set up the
mail buffer in my fairly modern machine (intel core 2 duo with 4G ram).
I do this measurement using stopwatch from the moment I hit RET at the
SUBJECT prompt and the result is reproducible. The process is instant
without flyspell.

This is by far the easiest way to see the great degradation in
performance due to flyspell.

I am running GNU Emacs 23.0.92.1 (i386-apple-darwin9.6.0, NS
apple-appkit-949.43) of 2009-04-12 on 64-71-7-214.static.wiline.com.

Best wishes,

Leo




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Tue, 14 Apr 2009 04:40:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Miles Bader <miles <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 14 Apr 2009 04:40:04 GMT) Full text and rfc822 format available.

Message #33 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Miles Bader <miles <at> gnu.org>
To: Leo <sdl.web <at> gmail.com>
Cc: 2056 <at> debbugs.gnu.org
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Tue, 14 Apr 2009 13:34:33 +0900
Leo <sdl.web <at> gmail.com> writes:
> I'd like to point out that with turn-on-flyspell added to
> text-mode-hook. M-x report-emacs-bug will take 9.8 seconds to set up the
> mail buffer in my fairly modern machine (intel core 2 duo with 4G ram).
> I do this measurement using stopwatch from the moment I hit RET at the
> SUBJECT prompt and the result is reproducible. The process is instant
> without flyspell.
...
> GNU Emacs 23.0.92.1 (i386-apple-darwin9.6.0, NS apple-appkit-949.43)

Hmm, it may be a macos problem, because on this system (also a core2duo,
though with only 1GB of RAM...) there's no perceptible delay when doing
the above.

(GNU Emacs 23.0.92.9 (x86_64-unknown-linux-gnu, GTK+ Version 2.16.0) of 2009-04-14 on dhlpc061)

-Miles

p.s. I've never tried using flyspell in mail... rather handy actually!

-- 
The trouble with most people is that they think with their hopes or
fears or wishes rather than with their minds.  -- Will Durant




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Tue, 14 Apr 2009 05:10:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 14 Apr 2009 05:10:04 GMT) Full text and rfc822 format available.

Message #38 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: Miles Bader <miles <at> gnu.org>
Cc: 2056 <at> debbugs.gnu.org
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Tue, 14 Apr 2009 06:02:21 +0100
On 2009-04-14 05:34 +0100, Miles Bader wrote:
[...]
> Hmm, it may be a macos problem, because on this system (also a core2duo,
> though with only 1GB of RAM...) there's no perceptible delay when doing
> the above.

How to verify whether that is indeed the culprit? And how to fix it?

> (GNU Emacs 23.0.92.9 (x86_64-unknown-linux-gnu, GTK+ Version 2.16.0) of 2009-04-14 on dhlpc061)
>
> -Miles
>
> p.s. I've never tried using flyspell in mail... rather handy actually!

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .: I use Emacs :.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Tue, 14 Apr 2009 07:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 14 Apr 2009 07:15:03 GMT) Full text and rfc822 format available.

Message #43 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Leo <sdl.web <at> gmail.com>, 2056 <at> debbugs.gnu.org
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Tue, 14 Apr 2009 10:09:15 +0300
> From: Leo <sdl.web <at> gmail.com>
> Date: Tue, 14 Apr 2009 00:48:58 +0100
> Cc: 
> 
> I'd like to point out that with turn-on-flyspell added to
> text-mode-hook. M-x report-emacs-bug will take 9.8 seconds to set up the
> mail buffer in my fairly modern machine (intel core 2 duo with 4G ram).
> I do this measurement using stopwatch from the moment I hit RET at the
> SUBJECT prompt and the result is reproducible. The process is instant
> without flyspell.

I don't see this on my machine (Windows XP), there's no visible delay.

Could it be that somehow each time you do this the speller sub-process
is started (because it is killed when the mail buffer is killed)?
That shouldn't be the case, but I have no other ideas, except
something platform-specific, as Miles suggested.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Tue, 14 Apr 2009 07:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 14 Apr 2009 07:15:04 GMT) Full text and rfc822 format available.

Message #48 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Leo <sdl.web <at> gmail.com>, 2056 <at> debbugs.gnu.org
Cc: miles <at> gnu.org
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Tue, 14 Apr 2009 10:10:55 +0300
> From: Leo <sdl.web <at> gmail.com>
> Date: Tue, 14 Apr 2009 06:02:21 +0100
> Cc: 2056 <at> emacsbugs.donarmstrong.com
> 
> On 2009-04-14 05:34 +0100, Miles Bader wrote:
> [...]
> > Hmm, it may be a macos problem, because on this system (also a core2duo,
> > though with only 1GB of RAM...) there's no perceptible delay when doing
> > the above.
> 
> How to verify whether that is indeed the culprit?

Try running Emacs under strace (or any equivalent, if that's not the
name of the utility on MacOS), and post the results here.  Maybe the
trace will show what takes so long.

> And how to fix it?

That depends on the findings, obviously.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Tue, 14 Apr 2009 16:35:05 GMT) Full text and rfc822 format available.

Message #51 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 2056 <at> debbugs.gnu.org, Leo <sdl.web <at> gmail.com>
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Tue, 14 Apr 2009 12:28:15 -0400
Eli Zaretskii wrote:

> That shouldn't be the case, but I have no other ideas, except
> something platform-specific, as Miles suggested.

Of the many times this bug has been reported, 2503 was on MS Windows,
and 2717 was on GNU/Linux.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Tue, 14 Apr 2009 17:15:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 14 Apr 2009 17:15:06 GMT) Full text and rfc822 format available.

Message #56 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 2056 <at> debbugs.gnu.org
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Tue, 14 Apr 2009 13:09:19 -0400
>> That shouldn't be the case, but I have no other ideas, except
>> something platform-specific, as Miles suggested.
> Of the many times this bug has been reported, 2503 was on MS Windows,
> and 2717 was on GNU/Linux.

Hmm, so it's about 8% more common under GNU/Linux.  Care to share your
script to count them (you didn't count them by hand, did you)?


        Stefan ;-)




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Tue, 14 Apr 2009 17:55:05 GMT) Full text and rfc822 format available.

Message #59 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 2056 <at> debbugs.gnu.org, Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Tue, 14 Apr 2009 10:47:49 -0700 (PDT)
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

  > >> That shouldn't be the case, but I have no other ideas, except
  > >> something platform-specific, as Miles suggested.
  > > Of the many times this bug has been reported, 2503 was on MS Windows,
  > > and 2717 was on GNU/Linux.
  > 
  > Hmm, so it's about 8% more common under GNU/Linux.  Care to share your
  > script to count them (you didn't count them by hand, did you)?

Didn't know it's possible to do arithmetic on bug numbers ...

Following the recipe from bug#2717 on GNU/Linux shows a slowdown for me
too.  
If instead I do (as suggested in some other bug):
emacs -Q gall1.shtml
M-: (setq process-connection-type nil) RET
M-x flyspell-mode RET

then the cursor movement is much better.  Not perfect, but still better.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Tue, 14 Apr 2009 22:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 14 Apr 2009 22:30:03 GMT) Full text and rfc822 format available.

Message #64 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Tue, 14 Apr 2009 23:21:46 +0100
On 2009-04-14 08:10 +0100, Eli Zaretskii wrote:
>> How to verify whether that is indeed the culprit?
>
> Try running Emacs under strace (or any equivalent, if that's not the
> name of the utility on MacOS), and post the results here.  Maybe the
> trace will show what takes so long.

I hope someone else who is more familiar with this can help. I am new to
OS X and I'm scared of using anything to do with C.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .: I use Emacs :.

               www.git-scm.com
    git - the one true version control system






Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Thu, 16 Apr 2009 18:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 16 Apr 2009 18:15:03 GMT) Full text and rfc822 format available.

Message #69 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 2056 <at> debbugs.gnu.org,
        Glenn Morris <rgm <at> gnu.org>
Subject: Re: 23.0.60; Enabling flyspell degrades performance
Date: Thu, 16 Apr 2009 14:07:34 -0400
> Following the recipe from bug#2717 on GNU/Linux shows a slowdown for
> me too.  If instead I do (as suggested in some other bug):
> emacs -Q gall1.shtml
> M-: (setq process-connection-type nil) RET
> M-x flyspell-mode RET
>
> then the cursor movement is much better.  Not perfect, but still
> better.

I see a slowdown, but the slowdown seems to be identical in Emacs 22 and
Emacs 23.  I suspect that flyspell is doing something silly (i.e., that
the problem is in flyspell rather than Emacs core).




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Thu, 16 Apr 2009 19:00:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 16 Apr 2009 19:00:06 GMT) Full text and rfc822 format available.

Message #74 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Dan Nicolaescu <dann <at> ics.uci.edu>
Cc: Ian Eure <ian <at> digg.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
        2056 <at> debbugs.gnu.org, Glenn Morris <rgm <at> gnu.org>,
        Leo <sdl.web <at> gmail.com>, Adrian Robert <Adrian.B.Robert <at> gmail.com>
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Thu, 16 Apr 2009 14:54:14 -0400
Dan Nicolaescu <dann <at> ics.uci.edu> 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).

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?




Disconnected #2717 from all other report(s). Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> emacsbugs.donarmstrong.com. (Thu, 16 Apr 2009 19:00:12 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Fri, 17 Apr 2009 22:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ian Eure <ian <at> digg.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 17 Apr 2009 22:50:03 GMT) Full text and rfc822 format available.

Message #81 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Ian Eure <ian <at> digg.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: Dan Nicolaescu <dann <at> ics.uci.edu>,
        Stefan Monnier <monnier <at> iro.umontreal.ca>,
        2056 <at> debbugs.gnu.org, Glenn Morris <rgm <at> gnu.org>,
        Leo <sdl.web <at> gmail.com>, Adrian Robert <Adrian.B.Robert <at> gmail.com>
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Fri, 17 Apr 2009 15:42:07 -0700
On Apr 16, 2009, at 11:54 AM, Chong Yidong wrote:

> Dan Nicolaescu <dann <at> ics.uci.edu> 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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2056; Package emacs. (Tue, 12 May 2009 02:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marc Schwartz <marc_schwartz <at> me.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 12 May 2009 02:45:04 GMT) Full text and rfc822 format available.

Message #86 received at 2056 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Marc Schwartz <marc_schwartz <at> me.com>
To: 2056 <at> debbugs.gnu.org
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Mon, 11 May 2009 21:41:51 -0500
Confirming that this behavior is still present using:

  GNU Emacs 23.0.93.1 (i386-apple-darwin9.6.2, NS apple- 
appkit-949.43) of 2009-05-11

I have the following in my .emacs:

  (load "/Users/marcschwartz/Downloads/Emacs/flyspell/flyspell")

  (autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
  (add-hook 'tex-mode-hook 'flyspell-mode)
  (add-hook 'text-mode-hook 'flyspell-mode)

This is on a fully updated unibody MacBook Pro with OSX 10.5.6.

If I comment all of the above lines, the performance of emacs is fast  
when editing and scrolling through a large file. If I leave the lines  
as is, or comment the last three lines and manually enable flyspell  
mode after emacs has started up, all scrolling and general cursor  
motion slows down to a crawl.

I disabled the toolbar, as per comments in various posts, but that has  
no effect on emacs performance. This seems to be solely related to the  
use of flyspell mode.

I should also note that this same performance hit occurs with the  
Aquamacs devel branch built from their git repo, which is based upon  
emacs 23. The current release Aquamacs 1.7, which is based upon emacs  
22, does not exhibit this behavior.





Forcibly Merged 2056 2503 2639 4273. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Fri, 28 Aug 2009 18:35:17 GMT) Full text and rfc822 format available.

Forcibly Merged 2056 2503 2639 4273 5133. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Mon, 07 Dec 2009 06:50:04 GMT) Full text and rfc822 format available.

Disconnected #2503 from all other report(s). Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 08 Dec 2009 20:20:04 GMT) Full text and rfc822 format available.

bug reassigned from package 'emacs' to 'emacs,ns'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 08 Dec 2009 20:20:05 GMT) Full text and rfc822 format available.

Severity set to 'important' from 'serious' Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Sat, 03 Apr 2010 00:12:02 GMT) Full text and rfc822 format available.

Forcibly Merged 2056 2639 4273 5133 12127. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 03 Aug 2012 07:21:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#2056; Package emacs,ns. (Sat, 22 Dec 2012 02:02:01 GMT) Full text and rfc822 format available.

Message #101 received at 2056 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: 2056 <at> debbugs.gnu.org
Subject: Re: bug#2056: 23.0.60; Enabling flyspell degrades performance
Date: Sat, 22 Dec 2012 10:00:40 +0800
Note for the bug tracker: a few months back, Jan did a change to the NS
event loop which improves the speed by 2x:

http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00531.html

If an OS X user can check whether the speed is now tolerable for normal
editing, we could close this bug or reduce its severity.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 10 Mar 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 43 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.