public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jeff King <peff@peff•net>
To: Mike Hommey <mh@glandium•org>
Cc: Johan Herland <johan@herland•net>, git@vger•kernel.org
Subject: Re: "git notes show" is orders of magnitude slower than doing it manually with ls-tree and cat-file
Date: Tue, 25 Nov 2014 23:49:35 -0500	[thread overview]
Message-ID: <20141126044935.GB15252@peff.net> (raw)
In-Reply-To: <20141126023039.GA19401@glandium.org>

On Wed, Nov 26, 2014 at 11:30:39AM +0900, Mike Hommey wrote:

> > Hmph. Having just written all that, I looked at your example again, and
> > you are running "git ls-tree -r", which would read the whole tree
> > anyway. So "git notes" should be _faster_ for a single lookup.
> 
> The -r actually doesn't matter, since what's being listed is a blob, not
> a tree, so there is no recursion.

Ah, right. I should have looked more carefully. I took the "-r" and the
patterns to mean "recursively list the tree, and I will grep for these
elements". But you were actually generating a set of pathspecs, which
git could then use to limit some of the walk.

-Peff

  reply	other threads:[~2014-11-26  4:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26  0:42 "git notes show" is orders of magnitude slower than doing it manually with ls-tree and cat-file Mike Hommey
2014-11-26  1:00 ` Jeff King
2014-11-26  1:24   ` Jeff King
2014-11-26  1:34     ` Jeff King
2014-11-26  2:30       ` Mike Hommey
2014-11-26  4:49         ` Jeff King [this message]
2014-11-26  2:25     ` Mike Hommey
2014-11-26  4:46       ` Jeff King
2014-11-26 11:46         ` Johan Herland
2014-11-26 12:30           ` Mike Hommey

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=20141126044935.GB15252@peff.net \
    --to=peff@peff$(echo .)net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=johan@herland$(echo .)net \
    --cc=mh@glandium$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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