From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Agustin Martin Newsgroups: gmane.emacs.devel Subject: Re: Emacs 22.2.90 pretest Date: Sat, 16 Aug 2008 17:23:51 +0200 Message-ID: <20080816152351.GA7654@agmartin.aq.upm.es> References: <87y72ymcig.fsf@stupidchicken.com> <87od3tkrd4.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1218900313 32745 80.91.229.12 (16 Aug 2008 15:25:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Aug 2008 15:25:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 16 17:26:04 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KUNfH-0008Rh-Ff for ged-emacs-devel@m.gmane.org; Sat, 16 Aug 2008 17:26:03 +0200 Original-Received: from localhost ([127.0.0.1]:58300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KUNeK-0000wU-Me for ged-emacs-devel@m.gmane.org; Sat, 16 Aug 2008 11:25:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KUNeG-0000w3-7y for emacs-devel@gnu.org; Sat, 16 Aug 2008 11:25:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KUNeE-0000tm-JO for emacs-devel@gnu.org; Sat, 16 Aug 2008 11:24:59 -0400 Original-Received: from [199.232.76.173] (port=52855 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KUNeE-0000td-By for emacs-devel@gnu.org; Sat, 16 Aug 2008 11:24:58 -0400 Original-Received: from edison.ccupm.upm.es ([138.100.4.49]:50847) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KUNeD-0000ZV-Ng for emacs-devel@gnu.org; Sat, 16 Aug 2008 11:24:58 -0400 Original-Received: from debian (domagus.ccupm.upm.es [138.100.247.74]) by edison.ccupm.upm.es (8.13.8/8.13.8) with ESMTP id m7GFNGTF025898; Sat, 16 Aug 2008 17:23:17 +0200 Original-Received: by debian (Postfix, from userid 1000) id 026E0174430; Sat, 16 Aug 2008 17:23:51 +0200 (CEST) Content-Disposition: inline In-Reply-To: <87od3tkrd4.fsf@stupidchicken.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:102532 Archived-At: On Sat, Aug 16, 2008 at 09:43:19AM -0400, Chong Yidong wrote: > Eli Zaretskii 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 > > > > * 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