all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: Fontifying grep results is slow
Date: Tue, 29 Jun 2010 08:27:44 +1000	[thread overview]
Message-ID: <87zkye7py7.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: 878w5zj95u.fsf@fh-trier.de

Andreas Politz <politza@fh-trier.de> 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


       reply	other threads:[~2010-06-28 22:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <878w5zj95u.fsf@fh-trier.de>
2010-06-28 22:27 ` Tim X [this message]
2010-07-02 18:02   ` Fontifying grep results is slow Andreas Politz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zkye7py7.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.