[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs 22.2.90 pretest
From: |
Agustin Martin |
Subject: |
Re: Emacs 22.2.90 pretest |
Date: |
Sat, 16 Aug 2008 17:23:51 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Sat, Aug 16, 2008 at 09:43:19AM -0400, Chong Yidong wrote:
> Eli Zaretskii <address@hidden> writes:
>
> > I notice that in this pretest, moving point with C-f and C-b or
> > inserting a single character is very sluggish: e.g., if I continuously
> > press C-f, Emacs cannot keep up(!), although this is a 3.2 GHz
> > machine. It almost feels like working on a remote machine.
> >
> > This recent change seems to be a likely suspect:
> >
> > 2008-07-28 Chong Yidong <address@hidden>
> >
> > * textmodes/flyspell.el (flyspell-word, flyspell-large-region)
> > (flyspell-region): Call ispell-maybe-find-aspell-dictionaries.
> >
> > It seems that its effect is to call ispell-maybe-find-aspell-dictionaries
> > on every editing command, which is silly, IMO. Even if we do need to do
> > that on every command (and I'd like to hear a reason why), the call
> > should only be made if Ispell is actually Aspell, which in my case it
> > isn't. On top of that, ispell-maybe-find-aspell-dictionaries
> > obviously was not designed to be called frequently: it calls
> > ispell-check-version, which is expensive and is supposed to be run
> > once in an Ispell session (it makes unnecessary destructive changes to
> > the Ispell buffer, invokes another Ispell process, etc.).
> >
> > Why was this change made?
>
> This was bug#232:
>
> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=232
>
> Does undoing this change make the problem go away? If so, it's probably
> better to revert it. (I attempted to backport a change from the trunk
> to the branch, but there were other changes to the trunk that apparently
> makes the dictionary initialization less expensive.)
I think only the change in (flyspell-word) is causing the problem. There was
no call there before new function (ispell-set-spellchecker-params) call was
added to HEAD. This makes sure expensive (ispell-check-version) call is done
only when there is an spellchecker change (or is the first time is used).
However (ispell-maybe-find-aspell-dictionaries) does not do that check, so
is very expensive when put there, since (flyspell-word) is continuosly
called.
The two other calls should be cheap, since they are run only once each time
functions containing it are called interactively.
--
Agustin
Re: Emacs 22.2.90 pretest, Lennart Borgman (gmail), 2008/08/17
Re: Emacs 22.2.90 pretest, YAMAMOTO Mitsuharu, 2008/08/20