unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: harder@ifa.au.dk, emacs-devel@gnu.org
Subject: Re: M-x grep is too slow
Date: Tue, 13 Jul 2004 09:36:47 +0900 (JST)	[thread overview]
Message-ID: <200407130036.JAA04111@etlken.m17n.org> (raw)
In-Reply-To: <E1BkAgT-0000zL-9a@fencepost.gnu.org> (message from Richard Stallman on Mon, 12 Jul 2004 19:58:09 -0400)

In article <E1BkAgT-0000zL-9a@fencepost.gnu.org>, Richard Stallman <rms@gnu.org> 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
handa@m17n.org

  reply	other threads:[~2004-07-13  0:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m3fz87bj8l.fsf@defun.localdomain>
     [not found] ` <E1BhWlL-0007Mq-Ns@fencepost.gnu.org>
     [not found]   ` <m3n02a2uo4.fsf@defun.localdomain>
     [not found]     ` <E1Bixsv-0001wJ-G8@fencepost.gnu.org>
     [not found]       ` <m3brim8m2r.fsf@defun.localdomain>
2004-07-12 23:58         ` M-x grep is too slow Richard Stallman
2004-07-13  0:36           ` Kenichi Handa [this message]
2004-07-13  5:00             ` Eli Zaretskii
2004-07-13 17:46             ` Stefan Monnier
2004-07-16 14:51               ` Kim F. Storm
2004-07-17 11:54                 ` Richard Stallman
2004-07-19 14:46                   ` Kim F. Storm
2004-07-20 20:43                     ` Richard Stallman
2004-07-21  8:36                       ` Kim F. Storm
2004-07-22 21:36                         ` Richard Stallman
2004-07-14  0:18             ` Richard Stallman
2004-07-14  0:17           ` Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=200407130036.JAA04111@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    --cc=harder@ifa.au.dk \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).