help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fontifying grep results is slow


From: Tim X
Subject: Re: Fontifying grep results is slow
Date: Wed, 08 Dec 2010 15:16:10 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]