emacs-devel
[Top][All Lists]
Advanced

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

Re: M-x grep is too slow


From: Kenichi Handa
Subject: Re: M-x grep is too slow
Date: Tue, 13 Jul 2004 09:36:47 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Richard Stallman <address@hidden> writes:

>     The time is used in `compilation-filter', i.e. by simply inserting the
>     strings in the buffer.

> That is quite strange.  I suspect this is due to some sort of hook,
> because just inserting strings at the end of the buffer will not get
> slower.  Is it due to the font-lock mechanism perhaps?

> If you run under GDB, you can stop it with C-z from time to time
> and make C and Lisp backtraces.  That should give more info about
> what is taking the time.

> Can you determine precisely which change made this problem appear?

> Can someone else join in looking at the problem?
> Here's the way to make it fail

>        M-x grep -nH -e while emacs/lisp/gnus/*.el

>     had not finished in over 20 minutes.

I tried the above but it finished quite soon.   But, when I tried:

        M-x grep -nH -e while emacs/lisp/*/*.el

it took long time.  So, I turned off global-font-lock-mode
and tried again.  But, *grep* buffer is fontified.   Isn't
it a bug?  Anyway, I tried this:

(add-hook 'grep-mode-hook #'(lambda () (font-lock-mode -1)))

Then the above grep also finished quite soon.  So, yes,
font-lock seems to be the culprit.

By the way, when I did C-h v grep-mode-hook RET and clicked
`grep' of "Defined in `grep'." in *Help* buffer, I got this
message:

        Cannot find definition of `grep-mode-hook' in library `grep'

Actually, this variable is defined not in grep.el but by
defined-dirived-mode.

---
Ken'ichi HANDA
address@hidden




reply via email to

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