From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Fontifying grep results is slow Date: Tue, 29 Jun 2010 08:27:44 +1000 Organization: Rapt Technologies Message-ID: <87zkye7py7.fsf@lion.rapttech.com.au> References: <878w5zj95u.fsf@fh-trier.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291839807 21151 80.91.229.12 (8 Dec 2010 20:23:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 20:23:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 08 21:23:23 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQQXr-0008Re-Ak for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 21:23:23 +0100 Original-Received: from localhost ([127.0.0.1]:60474 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQQXq-0004pU-Io for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 15:23:22 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!news-xfer.nntp.sonic.net!news.astraweb.com!border2.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:SH6+VUa+/nwEGcFQFateJXncavs= Original-Lines: 43 Original-NNTP-Posting-Host: d9fcc19c.news.astraweb.com Original-X-Trace: DXC=@R=35RE8a@8R@Y?`:@TCo5L?0kYOcDh@:i=VFiPm?<[5Z7D2ll?j1?2EEoMV90=M51KCCQUG[m0]9 Original-Xref: usenet.stanford.edu gnu.emacs.help:179308 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:75975 Archived-At: Andreas Politz writes: > Hi, > > I don't understand, why the time needed for fontifying grep matches, > seems to be a function of the results buffer-length. Is this the result > of refontifying the whole buffer again and again after each insertion ? > > It's easily observable with a search generating tenth of thousands of > matches (at least on this machine), it gets slower, and slower ... and > slower. Until the insertion of new matches comes almost to a halt. > > Disable font-lock-mode and the results are almost immediately available. > Reenabling it in buffer with many matches takes forever. > > Is this maybe a matter of to general, to much regexpes ? > I'm assuming your talking about M-x grep rather than running grep in a shell buffer etc. There are quite a few variables involved and it could be any one of them. Possibilities include - 1. Additional font-locking packages, such as devlock and its settings 2. The font-lock-support-mode being used - check it is jit-lock 3. Check setting of font-lock-maximum-decoration 4. Other modes, like longlinges-mode or other line wrapping settings may have an impact here, not sure. May depend on how long your lines are.. You can also try tweaking things to see if that improves matters. i.e. changing value for font-lock-maximum-size and font-lock-maximum-decoration, turning off devlock if installed, changing the faces used by grep etc. I don't notice any significant slowdown, but I have a fairly fast machine with lots of memory and tend to rarely do grep's that will return large data sets. Tim -- tcross (at) rapttech dot com dot au