From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16800: 24.3; flyspell works slow on very short words at the end of big file Date: Fri, 21 Feb 2014 17:12:54 +0200 Message-ID: <83k3co4hzd.fsf@gnu.org> References: <85zjlo5ecy.fsf@gmail.com> <83ob204vrv.fsf@gnu.org> <20140221143855.GA6018@agmartin.aq.upm.es> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1392995595 13958 80.91.229.3 (21 Feb 2014 15:13:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Feb 2014 15:13:15 +0000 (UTC) Cc: 16800@debbugs.gnu.org, aleksey.4erepanov@gmail.com To: Agustin Martin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 21 16:13:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WGrmu-0004yq-WF for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Feb 2014 16:13:17 +0100 Original-Received: from localhost ([::1]:45195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGrmu-0003M5-He for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Feb 2014 10:13:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGrmm-0003Lk-Fe for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 10:13:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGrmh-0006FZ-4h for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 10:13:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGrmh-0006FT-1T for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 10:13:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WGrmg-0006Os-IQ for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 10:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Feb 2014 15:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16800 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16800-submit@debbugs.gnu.org id=B16800.139299556824577 (code B ref 16800); Fri, 21 Feb 2014 15:13:02 +0000 Original-Received: (at 16800) by debbugs.gnu.org; 21 Feb 2014 15:12:48 +0000 Original-Received: from localhost ([127.0.0.1]:34896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGrmR-0006OK-Lq for submit@debbugs.gnu.org; Fri, 21 Feb 2014 10:12:48 -0500 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:43585) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGrmO-0006O2-7W for 16800@debbugs.gnu.org; Fri, 21 Feb 2014 10:12:45 -0500 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0N1C00K00PVFDX00@mtaout29.012.net.il> for 16800@debbugs.gnu.org; Fri, 21 Feb 2014 17:15:15 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1C00FXCQDFG860@mtaout29.012.net.il>; Fri, 21 Feb 2014 17:15:15 +0200 (IST) In-reply-to: <20140221143855.GA6018@agmartin.aq.upm.es> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:85979 Archived-At: > Date: Fri, 21 Feb 2014 15:38:55 +0100 > From: Agustin Martin > Cc: 16800@debbugs.gnu.org > > On Wed, Feb 19, 2014 at 12:56:45AM +0400, Aleksey Cherepanov wrote: > > flyspell-duplicate-distance variable on its own could mitigate the > > problem but it changes the behaviour so I do not want to use this > > variable. What behavior does it change? Do you really care to have a mis-spelled word be highlighted in a different face just because there's an identical mis-spelling half a megabyte away? > For the records, I was playing with a customized value of 50000 for that > distance and even if there is still a minor delay it is reasonable. I am > in a fast box, do not know in other boxes. I would suggest to change the default to something finite, like 20000 perhaps. Having it set to -1 by default is IMO unwieldy, since buffers can be very large. > > I tried to patch flyspell-word-search-backward and > > flyspell-word-search-forward functions from flyspell.el replacing > > search-backward with word-search-backward and search-forward with > > word-search-forward (perl -pe 's/\(search-/(word-search-/' ). It > > solved the problem but I do not know what it broke. And this doesn't change behavior? See below. > > I expect problems with this solution because I do not know if > > flyspell's meaning of word is the same as emacs' one. I think it is > > described in flyspell-get-word function that is called after search-* > > in the patched functions. > > I have never played with Emacs syntax tables, but I'd expect differences > only if there is a mismatch between chars in OTHERCHARS and non > alphabetic chars that Emacs considers as possible parts of a word. The effect depends on the language, I think.