Re: git status: small difference between stating whole repository and small subdirectory
- From
Jeff King <peff@peff.net>
- Date
- Feb 17, 2012, 22:29 UTC
- Message-ID
- <20120217222912.GC31830@sigill.intra.peff.net>
- In-Reply-To
- <7vaa4hrtbe.fsf@alter.siamese.dyndns.org>
On Fri, Feb 17, 2012 at 02:25:25PM -0800, Junio C Hamano wrote:
Show 13 quoted lines
> Jeff King <peff@peff.net> writes: > > > That being said, we do have an index extension to store the tree sha1 of > > whole directories (i.e., we populate it when we write a whole tree or > > subtree into the index from the object db, and it becomes invalidated > > when a file becomes modified). This optimization is used by things like > > "git commit" to avoid having to recreate the same sub-trees over and > > over when creating tree objects from the index. But we could also use it > > here to avoid having to even read the sub-tree objects from the object > > db. > > Like b65982b (Optimize "diff-index --cached" using cache-tree, 2009-05-20) > perhaps?
That's what I get for speaking before running "git log".
So yeah, we may be about as reasonably fast as we can go. Or maybe that optimization isn't kicking in for some reason. I think going further would require Piotr to do more profiling.
-Peff