unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: Finding files with tags
Date: Thu, 16 Mar 2006 09:57:28 -0700	[thread overview]
Message-ID: <dvc5f2$6ok$1@sea.gmane.org> (raw)
In-Reply-To: <dva47r$huc$1@sea.gmane.org>

Kevin Rodgers wrote:
> I wouldn't expect `grep | sed` or awk to be any faster than sed.
> My guess is that the performance bottlenecks are (1) splitting the sed
> output into a list of strings, (2) running ls on all those file names
> (ls sorts its output), and (3) parsing the output in dired.

I did a few timing experiments on just the sed command, using a 12MB
file like yourself and trying Sun's /usr/bin/sed and /usr/xpg4/bin/sed
and GNU's /usr/local/bin/gsed.  I was able to get more reliable results
by using ^A instead of DEL, and much better performance with this
command:

sed -n '/^A/!s/^\([^,]*\),[1-9][0-9]*$/\1/p' TAGS
          ^^
          just a single literal Control-A character

Another thing I thought of is that you could use the sed command to
generate a TAGS-FILES file once, whenever you update the TAGS file.
Then, the dired-tags-file command would just need to cat the TAGS-FILE
command (or better yet, visit it in a temporary buffer) to get the file
names to pass to dired.

-- 
Kevin Rodgers

      reply	other threads:[~2006-03-16 16:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-11  1:35 Finding files with tags mlathe
2006-03-11 11:15 ` Eli Zaretskii
2006-03-13 18:02   ` mlathe
2006-03-13 18:56 ` Kevin Rodgers
2006-03-13 20:48   ` mlathe
2006-03-13 23:32     ` Kevin Rodgers
2006-03-14  2:47       ` mlathe
2006-03-15 22:24         ` Kevin Rodgers
2006-03-16 16:57           ` Kevin Rodgers [this message]

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='dvc5f2$6ok$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.com \
    /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.
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).