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: Sun, 23 Feb 2014 20:36:04 +0200 Message-ID: <83mwhh1xt7.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> <83vbw72t05.fsf@gnu.org> <20140222160217.GA15616@openwall.com> <83ios72j8b.fsf@gnu.org> <20140222185511.GA23643@openwall.com> <838ut23lo9.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1393180630 2898 80.91.229.3 (23 Feb 2014 18:37:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Feb 2014 18:37:10 +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 Sun Feb 23 19:37: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 1WHdvR-0006BQ-9b for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Feb 2014 19:37:17 +0100 Original-Received: from localhost ([::1]:53917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHdvQ-0000GH-PA for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Feb 2014 13:37:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHdvI-0000GC-BY for bug-gnu-emacs@gnu.org; Sun, 23 Feb 2014 13:37:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHdvC-0003hG-6v for bug-gnu-emacs@gnu.org; Sun, 23 Feb 2014 13:37:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHdvC-0003h6-3P for bug-gnu-emacs@gnu.org; Sun, 23 Feb 2014 13:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WHdvB-0005ET-L0 for bug-gnu-emacs@gnu.org; Sun, 23 Feb 2014 13:37: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: Sun, 23 Feb 2014 18:37: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.139318058720070 (code B ref 16800); Sun, 23 Feb 2014 18:37:01 +0000 Original-Received: (at 16800) by debbugs.gnu.org; 23 Feb 2014 18:36:27 +0000 Original-Received: from localhost ([127.0.0.1]:36887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHduc-0005Dd-HF for submit@debbugs.gnu.org; Sun, 23 Feb 2014 13:36:26 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:39011) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHduZ-0005DM-Dr for 16800@debbugs.gnu.org; Sun, 23 Feb 2014 13:36:24 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N1G00E00OQ6V500@a-mtaout20.012.net.il> for 16800@debbugs.gnu.org; Sun, 23 Feb 2014 20:36:16 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1G00EADP0GS220@a-mtaout20.012.net.il>; Sun, 23 Feb 2014 20:36:16 +0200 (IST) In-reply-to: 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:86079 Archived-At: > Date: Sun, 23 Feb 2014 02:26:00 +0100 > From: Agustin Martin > Cc: Aleksey Cherepanov > > Not yet sure if I am missing something important, but I am playing with a > regexp search in flyspell-word-search-* functions based on what flyspell > thinks is the word to spellcheck (`word') and what thinks should not be > part of a word (`NOTCASECHARS'). Since no OTHERCHARS is used there may be > some intermediate matches being false positives that will be discarded once > flyspell-word checks them. > > I have tested this in Alekseys's file and is apparently working well and in > this particular case with much better efficiency. Need to think about more > ad-hoc situations where it may fail or slow down things. Suggestions for > possible failures are welcome. > > Patch is attached. I did the tests against an old and patched version of > flyspell.el (that shipped with Debian stable) and built the patch for it. > Should apply and work similarly in trunk's flyspell.el. Thanks, it's good to know it's possible to speed up the search for duplicate mis-spellings without sacrificing correctness. However, for any speedup that we will be able to come up with, there can always be a buffer large enough to make the delay annoyingly long. Therefore, I think the default of flyspell-duplicate-distance should not be -1, but some finite and reasonably small value. Or maybe we should turn off this feature by default.