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 12:15:00 +0200 Message-ID: <83ob204vrv.fsf@gnu.org> References: <85zjlo5ecy.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1392977718 24454 80.91.229.3 (21 Feb 2014 10:15:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Feb 2014 10:15:18 +0000 (UTC) Cc: 16800@debbugs.gnu.org To: Aleksey Cherepanov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 21 11:15:25 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 1WGn8e-00069M-At for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Feb 2014 11:15:24 +0100 Original-Received: from localhost ([::1]:43477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGn8d-00085o-Pe for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Feb 2014 05:15:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGn8S-00085L-Lf for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 05:15:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGn8J-0003ma-Qn for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 05:15:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33104) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGn8I-0003iY-SU for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 05:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WGn8I-0005cS-1W for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 05:15: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 10:15: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.139297769421572 (code B ref 16800); Fri, 21 Feb 2014 10:15:01 +0000 Original-Received: (at 16800) by debbugs.gnu.org; 21 Feb 2014 10:14:54 +0000 Original-Received: from localhost ([127.0.0.1]:34286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGn89-0005bs-SN for submit@debbugs.gnu.org; Fri, 21 Feb 2014 05:14:54 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:43730) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGn86-0005bZ-MB for 16800@debbugs.gnu.org; Fri, 21 Feb 2014 05:14:52 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0N1C00J00C3K3500@a-mtaout21.012.net.il> for 16800@debbugs.gnu.org; Fri, 21 Feb 2014 12:14:44 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1C00IWACGJYJ50@a-mtaout21.012.net.il>; Fri, 21 Feb 2014 12:14:44 +0200 (IST) In-reply-to: <85zjlo5ecy.fsf@gmail.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:85967 Archived-At: > From: Aleksey Cherepanov > Date: Wed, 19 Feb 2014 00:56:45 +0400 > > I faced a problem editing my big .org file (2mb+) with flyspell-mode > enabled. I edit it every day, regularly mistype and get words of one > or two letters that are wrong in Russian and cause flyspell work slow. > > This one-liner produces "good" file to reproduce the bug. > perl -e 'print(((join " ", ("met and") x 10) . "\n") x 30000)' > t.txt > > Typing "nd" at the end of file gives a huge pause even on a fast > computer. But "mw" or "md" does not give pauses because they are not > substrings in this file. It is repeatable with emacs -Q. This seems to be due to the Flyspell's feature of recognizing duplicates of mis-spelled words, and, if found, highlighting such duplicates in a different face. If you customize the variable flyspell-duplicate-distance to some small value (or even zero), the delay goes away. Evidently, with the default value of -1, Flyspell searches all the way to the beginning of the giant buffer, looking for a duplicate of "nd". Interestingly, I don't see this when the speller is Ispell, but I do see it with Hunspell. Not sure how using Ispell avoids this problem.