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: Sat, 22 Feb 2014 15:10:02 +0200 Message-ID: <83vbw72t05.fsf@gnu.org> References: <85zjlo5ecy.fsf@gmail.com> <83ob204vrv.fsf@gnu.org> <20140221143855.GA6018@agmartin.aq.upm.es> <83k3co4hzd.fsf@gnu.org> <20140222124413.GA4971@openwall.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1393074609 15864 80.91.229.3 (22 Feb 2014 13:10:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Feb 2014 13:10:09 +0000 (UTC) Cc: 16800@debbugs.gnu.org, agustin.martin@hispalinux.es To: Aleksey Cherepanov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 22 14:10:17 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 1WHCLP-0000rD-Os for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Feb 2014 14:10:15 +0100 Original-Received: from localhost ([::1]:49532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHCLP-00018Z-9M for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Feb 2014 08:10:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHCLH-000153-RL for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2014 08:10:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHCLC-0005wy-He for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2014 08:10:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHCLC-0005wp-Dr for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2014 08:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WHCLB-0004Ct-PT for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2014 08:10:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Feb 2014 13:10:01 +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.139307459016147 (code B ref 16800); Sat, 22 Feb 2014 13:10:01 +0000 Original-Received: (at 16800) by debbugs.gnu.org; 22 Feb 2014 13:09:50 +0000 Original-Received: from localhost ([127.0.0.1]:35467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHCL0-0004CM-E4 for submit@debbugs.gnu.org; Sat, 22 Feb 2014 08:09:50 -0500 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:52899) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHCKy-0004C6-8p for 16800@debbugs.gnu.org; Sat, 22 Feb 2014 08:09:49 -0500 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0N1E00900ED01N00@mtaout24.012.net.il> for 16800@debbugs.gnu.org; Sat, 22 Feb 2014 15:08:21 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1E006PZF5XPU50@mtaout24.012.net.il>; Sat, 22 Feb 2014 15:08:21 +0200 (IST) In-reply-to: <20140222124413.GA4971@openwall.com> 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:86021 Archived-At: > Date: Sat, 22 Feb 2014 16:44:13 +0400 > From: Aleksey Cherepanov > Cc: Agustin Martin , 16800@debbugs.gnu.org > > Also GNU coding standards say to avoid arbitrary limits (parts 2.1 > and 4.2). > http://www.gnu.org/prep/standards/standards.html This limit is not arbitrary. > > > > 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. > > No, it seems that my setup works the same. See below. Your setup _might_ work the same, especially if you don't mix different languages in the same buffer. But in general, your change does affect behavior. > The difference is in word bounds. We are in trouble if flyspell's word > on its ends does not have ends of emacs' word. If flyspell's word has > ends of emacs' word on its ends and even contain them inside then we > are ok (try to search "a b" over "aa bb a b aa bb"). So could ends of > flyspell's word do not match with ends of emacs' word? Yes, definitely. See what flyspell-get-word does to find where the word begins and where it ends. Flyspell's "words" are language-sensitive, whereas Emacs's words are not.