From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#22090: Isearch is sluggish and eventually refuses further service with "[Too many words]". Date: 4 Dec 2015 19:21:26 -0000 Organization: muc.de e.V. Message-ID: <20151204192126.73199.qmail@mail.muc.de> References: <20151204042052.GA1965@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1449256938 7520 80.91.229.3 (4 Dec 2015 19:22:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Dec 2015 19:22:18 +0000 (UTC) Cc: 22090@debbugs.gnu.org To: bruce.connor.am@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 04 20:22:10 2015 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 1a4vvl-0005Pt-Oj for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Dec 2015 20:22:09 +0100 Original-Received: from localhost ([::1]:43003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4vvl-0005JW-0B for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Dec 2015 14:22:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4vvh-0005JR-Cs for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2015 14:22:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4vve-0007B5-95 for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2015 14:22:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4vve-0007B1-5h for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2015 14:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a4vvd-0005Mh-T4 for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2015 14:22:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Dec 2015 19:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22090 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22090-submit@debbugs.gnu.org id=B22090.144925690920605 (code B ref 22090); Fri, 04 Dec 2015 19:22:01 +0000 Original-Received: (at 22090) by debbugs.gnu.org; 4 Dec 2015 19:21:49 +0000 Original-Received: from localhost ([127.0.0.1]:39384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4vvQ-0005MG-DP for submit@debbugs.gnu.org; Fri, 04 Dec 2015 14:21:48 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:24206) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a4vv5-0005Ln-H9 for 22090@debbugs.gnu.org; Fri, 04 Dec 2015 14:21:46 -0500 Original-Received: (qmail 73200 invoked by uid 3782); 4 Dec 2015 19:21:26 -0000 In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.3.1-20141224 ("Tallant") (UNIX) (FreeBSD/10.1-RELEASE-p16 (amd64)) 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: 208.118.235.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:109617 Archived-At: Hello, Artur. In article you wrot= e: > 2015-12-04 9:23 GMT+00:00 Eli Zaretskii : >>> Date: Fri, 4 Dec 2015 04:20:52 +0000 >>> From: Alan Mackenzie >>> >>> With a recent emacs-25 (last update >>> eaa1fd6dbff8346eb38485de5ebf0fbfacf374d9 from Thursday 2015-12-03): >>> >>> emacs -Q >>> C-c C-f src/xdisp.c >>> Move point to L30 (paragraph beginning "Updating the display is trigg= ered >>> by the Lisp interpreter ...") >>> >>> C-s >>> C-w repeatedly, to yank words onto the search string. >>> >>> After ~29 words have been yanked, the response becomes sluggish, paus= ing >>> for between 0.5s and 1s before highlighting the "for" at the end of L= 31. > Thanks for the report. The source for this (and for a similar bug > mentioned on a thread in emacs-devel) was the code I had added for > special case-folding support. > For now, I've just removed the code. I can think of a way of solving > this, but it adds some complexity to isearch, which I don't wanna do > (and I don't think this feature was that important anyway). Here's a > full copy of the commit message explaining why the bug happens. > 30f3432 * lisp/character-fold.el: Remove special case-folding support > (character-fold-to-regexp): Remove special code for > case-folding. Char-fold search still respects the > `case-fold-search' variable (i.e., f matches F). This only > removes the code that was added to ensure that f also matched > all chars that F matched. For instance, after this commit, f > no longer matches =F0=9D=94=BD. > This was necessary because the logic created a regexp with > 2^(length of the string) redundant paths. So, when a very > long string "almost" matched, Emacs took a very long time to > figure out that it didn't. This became particularly relevant > because isearch's lazy-highlight does a search bounded by (1- > match-end) (which, in most circumstances, is a search that > almost matches). A recipe for this can be found in bug#22090. Would you like any help to sort out these regexps? I have some expertise in doing this, having half-written fix-re.el, a program which analyses and corrects just the sort of thing you're talking about. --=20 Alan Mackenzie (Nuremberg, Germany).