From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Aleksey Cherepanov Newsgroups: gmane.emacs.bugs Subject: bug#16800: 24.3; flyspell works slow on very short words at the end of big file Date: Mon, 24 Feb 2014 00:39:58 +0400 Message-ID: <20140223203958.GA26665@openwall.com> References: <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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1393188076 17986 80.91.229.3 (23 Feb 2014 20:41:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Feb 2014 20:41:16 +0000 (UTC) Cc: 16800@debbugs.gnu.org To: Agustin Martin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 23 21:41:23 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 1WHfrX-0003sh-4l for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Feb 2014 21:41:23 +0100 Original-Received: from localhost ([::1]:54238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHfrW-0007Zn-OE for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Feb 2014 15:41:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHfrM-0007ZV-Ic for bug-gnu-emacs@gnu.org; Sun, 23 Feb 2014 15:41:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHfrD-0008BK-97 for bug-gnu-emacs@gnu.org; Sun, 23 Feb 2014 15:41:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHfrD-0008BE-58 for bug-gnu-emacs@gnu.org; Sun, 23 Feb 2014 15:41:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WHfrC-0000E9-H2 for bug-gnu-emacs@gnu.org; Sun, 23 Feb 2014 15:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Aleksey Cherepanov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Feb 2014 20:41: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.1393188011800 (code B ref 16800); Sun, 23 Feb 2014 20:41:02 +0000 Original-Received: (at 16800) by debbugs.gnu.org; 23 Feb 2014 20:40:11 +0000 Original-Received: from localhost ([127.0.0.1]:36970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHfqM-0000Cp-L5 for submit@debbugs.gnu.org; Sun, 23 Feb 2014 15:40:11 -0500 Original-Received: from mail-la0-f48.google.com ([209.85.215.48]:57871) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHfqJ-0000C9-Dv for 16800@debbugs.gnu.org; Sun, 23 Feb 2014 15:40:08 -0500 Original-Received: by mail-la0-f48.google.com with SMTP id gf5so1586811lab.7 for <16800@debbugs.gnu.org>; Sun, 23 Feb 2014 12:40:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=UHMtVDqz4N8n4i+5An4pOw9rrQyMFMAAMIv4IlPTqWA=; b=Bimntl+ph/HzDZmx2GBkZMI0+cmVV9hiak4aCyvQo4hEPser/+WhqxBjmOaGx0bIRN aLfjpVdFwiaH1dPmk8Zqr5ximL1CNJgXn7XxDZ90w5cmSKfdqrc0IQicin8tQOfEewPm PRrPJgeQ+xC/KOTkdWwHqA81z9E4rW1ER9m2NV4NQla34Up9YTY32SNHjR2l+Ysu49B5 cFYh468T5GrC4/q1HtwVU6hzPvXhUo0hOOy/q9Hv2HRoGTvUozfmrpEdmheTPOX+vW4I L5vBZZ4xze8FY93ECDewBsshxa4RPkJ1yZ+RGvta24fOp3Sv2TuRUfB5TyN/89TzHD0b uNFA== X-Received: by 10.112.125.225 with SMTP id mt1mr9533251lbb.35.1393188001142; Sun, 23 Feb 2014 12:40:01 -0800 (PST) Original-Received: from openwall.com ([188.123.230.115]) by mx.google.com with ESMTPSA id jf8sm16061492lbc.8.2014.02.23.12.40.00 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 23 Feb 2014 12:40:00 -0800 (PST) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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:86082 Archived-At: On Sun, Feb 23, 2014 at 02:26:00AM +0100, Agustin Martin wrote: > --- flyspell.el.orig 2014-02-23 02:17:03.680107519 +0100 > +++ flyspell.el 2014-02-23 02:50:50.634625248 +0100 > @@ -1050,8 +1050,19 @@ > (save-excursion > (let ((r '()) > (inhibit-point-motion-hooks t) > + (flyspell-not-casechars (flyspell-get-not-casechars)) > p) > - (while (and (not r) (setq p (search-backward word bound t))) > + (while > + (and (not r) > + (setq p > + (re-search-backward > + (concat > + "\\(" flyspell-not-casechars "\\|\\b\\)" > + "\\(" word "\\)" > + flyspell-not-casechars > + ) > + bound t))) > + (goto-char (match-beginning 2)) I am not yet sure that it is important. But as written we store position - 1 instead of position if we matched with flyspell-not-casechars branch. (goto-char ...) could be placed inside (setq p ...) to fix it: (setq p (and (re-search ...) (goto-char ...))) I do not know real difference yet though. Respectively we store position + 1 in forward search. Thanks! -- Regards, Aleksey Cherepanov