git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "Ondřej Bílka" <neleai@seznam.cz>
Cc: git@vger.kernel.org
Subject: Re: [RFC] Faster git grep.
Date: Thu, 25 Jul 2013 16:08:57 -0400	[thread overview]
Message-ID: <20130725200857.GB1225@sigill.intra.peff.net> (raw)
In-Reply-To: <20130725182905.GA7664@domone.kolej.mff.cuni.cz>

On Thu, Jul 25, 2013 at 08:29:05PM +0200, Ondřej Bílka wrote:

> One solution would be to use same trick as was done in google code.
> Build and keep database of trigraphs and which files contain how many of
> them. When querry is made then check
> only these files that have appropriate combination of trigraphs.

That seems like a sensible approach.

> Updating database would be relatively inexpensive compared to disk
> access we need to do anyway.

Yes, I think it can be quite cheap, since you would only need to
re-index files that have changed (and git is very quick at telling you
what those files are).

> A space usage might be problem so which is why I decided go option
> route.
> 
> Comments, pointers?

I think it is a good idea, but not need to be part of core git. It seems
more like you would want to glue together an existing code-indexing
solution (like codesearch) with git (which would provide the list of
files to index and to search).

If that proves useful in practice, but the interface is clunky for
whatever reason, then a good follow-on project could be to build support
for updating and using the index via the usual "git grep".

-Peff

  reply	other threads:[~2013-07-25 20:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25 18:29 [RFC] Faster git grep Ondřej Bílka
2013-07-25 20:08 ` Jeff King [this message]
2013-07-25 20:41 ` Junio C Hamano
2013-07-25 21:31   ` Ondřej Bílka
2013-07-26  1:28     ` Junio C Hamano
2013-07-26  5:45       ` Ondřej Bílka

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

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

  git send-email \
    --in-reply-to=20130725200857.GB1225@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=neleai@seznam.cz \
    /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 NNTP newsgroup(s).