* bug#2056: 23.0.60; Enabling flyspell degrades performance
@ 2009-01-25 19:08 Ian Eure
2009-01-30 12:11 ` Agustin Martin
2012-12-22 2:00 ` Chong Yidong
0 siblings, 2 replies; 17+ messages in thread
From: Ian Eure @ 2009-01-25 19:08 UTC (permalink / raw
To: emacs-pretest-bug
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
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
2009-01-25 19:08 bug#2056: 23.0.60; Enabling flyspell degrades performance Ian Eure
@ 2009-01-30 12:11 ` Agustin Martin
2009-03-26 21:22 ` Ian Eure
2012-12-22 2:00 ` Chong Yidong
1 sibling, 1 reply; 17+ messages in thread
From: Agustin Martin @ 2009-01-30 12:11 UTC (permalink / raw
To: Ian Eure, 2056
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
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
2009-01-30 12:11 ` Agustin Martin
@ 2009-03-26 21:22 ` Ian Eure
0 siblings, 0 replies; 17+ messages in thread
From: Ian Eure @ 2009-03-26 21:22 UTC (permalink / raw
To: Agustin Martin; +Cc: 2056
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
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
2009-01-25 19:08 bug#2056: 23.0.60; Enabling flyspell degrades performance Ian Eure
2009-01-30 12:11 ` Agustin Martin
@ 2012-12-22 2:00 ` Chong Yidong
1 sibling, 0 replies; 17+ messages in thread
From: Chong Yidong @ 2012-12-22 2:00 UTC (permalink / raw
To: 2056
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.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
@ 2009-04-13 23:48 Leo
2009-04-14 7:09 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: Leo @ 2009-04-13 23:48 UTC (permalink / raw
To: 2056
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
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
2009-04-13 23:48 Leo
@ 2009-04-14 7:09 ` Eli Zaretskii
2009-04-14 16:28 ` Glenn Morris
0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2009-04-14 7:09 UTC (permalink / raw
To: Leo, 2056
> From: Leo <sdl.web@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.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
2009-04-14 7:09 ` Eli Zaretskii
@ 2009-04-14 16:28 ` Glenn Morris
2009-04-14 17:09 ` Stefan Monnier
0 siblings, 1 reply; 17+ messages in thread
From: Glenn Morris @ 2009-04-14 16:28 UTC (permalink / raw
To: Eli Zaretskii; +Cc: Leo, 2056
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.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
2009-04-14 16:28 ` Glenn Morris
@ 2009-04-14 17:09 ` Stefan Monnier
2009-04-14 17:47 ` Dan Nicolaescu
0 siblings, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2009-04-14 17:09 UTC (permalink / raw
To: Glenn Morris; +Cc: 2056
>> 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 ;-)
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
2009-04-14 17:09 ` Stefan Monnier
@ 2009-04-14 17:47 ` Dan Nicolaescu
0 siblings, 0 replies; 17+ messages in thread
From: Dan Nicolaescu @ 2009-04-14 17:47 UTC (permalink / raw
To: Stefan Monnier; +Cc: 2056
Stefan Monnier <monnier@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.
^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <mailman.5279.1239667439.31690.bug-gnu-emacs@gnu.org>]
* bug#2056: 23.0.60; Enabling flyspell degrades performance
[not found] <mailman.5279.1239667439.31690.bug-gnu-emacs@gnu.org>
@ 2009-04-14 4:34 ` Miles Bader
2009-04-14 5:02 ` Leo
0 siblings, 1 reply; 17+ messages in thread
From: Miles Bader @ 2009-04-14 4:34 UTC (permalink / raw
To: Leo; +Cc: 2056
Leo <sdl.web@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
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
2009-04-14 4:34 ` Miles Bader
@ 2009-04-14 5:02 ` Leo
2009-04-14 7:10 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: Leo @ 2009-04-14 5:02 UTC (permalink / raw
To: Miles Bader; +Cc: 2056
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 :.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
2009-04-14 5:02 ` Leo
@ 2009-04-14 7:10 ` Eli Zaretskii
2009-04-14 22:21 ` Leo
0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2009-04-14 7:10 UTC (permalink / raw
To: Leo, 2056; +Cc: miles
> From: Leo <sdl.web@gmail.com>
> Date: Tue, 14 Apr 2009 06:02:21 +0100
> Cc: 2056@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.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
2009-04-14 7:10 ` Eli Zaretskii
@ 2009-04-14 22:21 ` Leo
0 siblings, 0 replies; 17+ messages in thread
From: Leo @ 2009-04-14 22:21 UTC (permalink / raw
To: bug-gnu-emacs
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
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
@ 2009-04-16 18:07 Chong Yidong
0 siblings, 0 replies; 17+ messages in thread
From: Chong Yidong @ 2009-04-16 18:07 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: 2056
> 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).
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
@ 2009-04-16 18:54 Chong Yidong
2009-04-17 22:42 ` Ian Eure
0 siblings, 1 reply; 17+ messages in thread
From: Chong Yidong @ 2009-04-16 18:54 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: Ian Eure, 2056, Adrian Robert, Leo
Dan Nicolaescu <dann@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?
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
2009-04-16 18:54 Chong Yidong
@ 2009-04-17 22:42 ` Ian Eure
0 siblings, 0 replies; 17+ messages in thread
From: Ian Eure @ 2009-04-17 22:42 UTC (permalink / raw
To: Chong Yidong; +Cc: 2056, Adrian Robert, Dan Nicolaescu, Leo
On Apr 16, 2009, at 11:54 AM, Chong Yidong wrote:
> Dan Nicolaescu <dann@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
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#2056: 23.0.60; Enabling flyspell degrades performance
@ 2009-05-12 2:41 Marc Schwartz
0 siblings, 0 replies; 17+ messages in thread
From: Marc Schwartz @ 2009-05-12 2:41 UTC (permalink / raw
To: 2056
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.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2012-12-22 2:00 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-25 19:08 bug#2056: 23.0.60; Enabling flyspell degrades performance Ian Eure
2009-01-30 12:11 ` Agustin Martin
2009-03-26 21:22 ` Ian Eure
2012-12-22 2:00 ` Chong Yidong
-- strict thread matches above, loose matches on Subject: below --
2009-04-13 23:48 Leo
2009-04-14 7:09 ` Eli Zaretskii
2009-04-14 16:28 ` Glenn Morris
2009-04-14 17:09 ` Stefan Monnier
2009-04-14 17:47 ` Dan Nicolaescu
[not found] <mailman.5279.1239667439.31690.bug-gnu-emacs@gnu.org>
2009-04-14 4:34 ` Miles Bader
2009-04-14 5:02 ` Leo
2009-04-14 7:10 ` Eli Zaretskii
2009-04-14 22:21 ` Leo
2009-04-16 18:07 Chong Yidong
2009-04-16 18:54 Chong Yidong
2009-04-17 22:42 ` Ian Eure
2009-05-12 2:41 Marc Schwartz
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.