Re: "git notes show" is orders of magnitude slower than doing it manually with ls-tree and cat-file
- From
Jeff King <peff@peff.net>
- Date
- Nov 26, 2014, 04:49 UTC
- Message-ID
- <20141126044935.GB15252@peff.net>
- In-Reply-To
- <20141126023039.GA19401@glandium.org>
On Wed, Nov 26, 2014 at 11:30:39AM +0900, Mike Hommey wrote:
Show 6 quoted lines
> > 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