* Re: Fontifying grep results is slow
[not found] <878w5zj95u.fsf@fh-trier.de>
@ 2010-06-28 22:27 ` Tim X
2010-07-02 18:02 ` Andreas Politz
0 siblings, 1 reply; 2+ messages in thread
From: Tim X @ 2010-06-28 22:27 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Fontifying grep results is slow
2010-06-28 22:27 ` Fontifying grep results is slow Tim X
@ 2010-07-02 18:02 ` Andreas Politz
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Politz @ 2010-07-02 18:02 UTC (permalink / raw)
To: help-gnu-emacs
Tim X <timx@nospam.dev.null> writes:
> 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.
Yes.
>
> 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..
emacs -Q here.
I guess the main point, I would like to understand is, if (at all) and
why the time spend fontifying a new line of grep result seems to be a
function on the size of the result buffer.
Anyway I guess I should try to reduce the complexity of the font-lock
regexps.
>
> 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.
That's good for you, because it's not usable anyway (At least with
font-lock enabled.).
>
> Tim
-ap
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-02 18:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <878w5zj95u.fsf@fh-trier.de>
2010-06-28 22:27 ` Fontifying grep results is slow Tim X
2010-07-02 18:02 ` Andreas Politz
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.