From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: cperl + isearch + font-lock-multiline sometimes very slow Date: Thu, 19 Oct 2006 23:45:54 -0400 Message-ID: <87hcxzd4zx.fsf@furball.mit.edu> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1161366335 13977 80.91.229.2 (20 Oct 2006 17:45:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Oct 2006 17:45:35 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 20 19:45:34 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GayQu-0005F2-Sf for ged-emacs-devel@m.gmane.org; Fri, 20 Oct 2006 19:45:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GayQu-0007Ct-Fv for ged-emacs-devel@m.gmane.org; Fri, 20 Oct 2006 13:45:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GalKf-0006p3-Cs for emacs-devel@gnu.org; Thu, 19 Oct 2006 23:46:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GalKe-0006n6-Um for emacs-devel@gnu.org; Thu, 19 Oct 2006 23:46:04 -0400 Original-Received: from [18.72.1.2] (helo=south-station-annex.mit.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GalKe-00055u-LY for emacs-devel@gnu.org; Thu, 19 Oct 2006 23:46:04 -0400 Original-Received: from central-city-carrier-station.mit.edu (CENTRAL-CITY-CARRIER-STATION.MIT.EDU [18.7.7.72]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id k9K3k05x010508; Thu, 19 Oct 2006 23:46:00 -0400 (EDT) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by central-city-carrier-station.mit.edu (8.13.6/8.9.2) with ESMTP id k9K3jvid018203; Thu, 19 Oct 2006 23:45:57 -0400 (EDT) Original-Received: from furball.mit.edu (SYDNEYPACIFIC-THREE-TWENTY-TWO.MIT.EDU [18.95.6.67]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id k9K3js1P026476; Thu, 19 Oct 2006 23:45:54 -0400 (EDT) Original-Received: from cyd by furball.mit.edu with local (Exim 3.36 #1 (Debian)) id 1GalKU-0000k7-00; Thu, 19 Oct 2006 23:45:54 -0400 Original-To: Klaus Zeitler In-Reply-To: (Klaus Zeitler's message of "Thu\, 19 Oct 2006 08\:21\:22 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Spam-Score: 1.217 X-Scanned-By: MIMEDefang 2.42 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60936 Archived-At: Klaus Zeitler writes: > Since approx. last week isearch slows sometimes down to crawling speed in > cperl files. Looking at top I see that emacs then needs around 30% CPU and > when I stop isearch, for the next minute emacs eats up even more CPU before > going back to normal behavior. > This behavior disappeared when I turned off font-lock. Therefore I checked > my font-lock settings and found out that setting font-lock-multiline to nil > also helped. So I'm guessing it has something to do with font-lock or > jit-lock. How should I proceed now to investigate this further? I can't reproduce this. Could you provide a detailed recipe and/or test file? Also, see if the slowdown goes away if you increase REGEXP_CACHE_SIZE to (e.g.) 40 in search.c, as Kim suggested. #define REGEXP_CACHE_SIZE 20