From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: git status: small difference between stating whole repository and small subdirectory Date: Fri, 17 Feb 2012 17:29:12 -0500 Message-ID: <20120217222912.GC31830@sigill.intra.peff.net> References: <8762f9k5sg.fsf@thomas.inf.ethz.ch> <20120215190318.GA5992@sigill.intra.peff.net> <20120216192001.GB4348@sigill.intra.peff.net> <20120217203755.GA30114@sigill.intra.peff.net> <7vaa4hrtbe.fsf@alter.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Piotr Krukowiecki , Thomas Rast , Git Mailing List , Nguyen Thai Ngoc Duy To: Junio C Hamano X-From: git-owner@vger.kernel.org Fri Feb 17 23:29:20 2012 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RyWIp-00012y-EF for gcvg-git-2@plane.gmane.org; Fri, 17 Feb 2012 23:29:19 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754887Ab2BQW3O (ORCPT ); Fri, 17 Feb 2012 17:29:14 -0500 Received: from 99-108-226-0.lightspeed.iplsin.sbcglobal.net ([99.108.226.0]:41259 "EHLO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752977Ab2BQW3O (ORCPT ); Fri, 17 Feb 2012 17:29:14 -0500 Received: (qmail 12836 invoked by uid 107); 17 Feb 2012 22:29:13 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) (smtp-auth username relayok, mechanism cram-md5) by peff.net (qpsmtpd/0.84) with ESMTPA; Fri, 17 Feb 2012 17:29:13 -0500 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Fri, 17 Feb 2012 17:29:12 -0500 Content-Disposition: inline In-Reply-To: <7vaa4hrtbe.fsf@alter.siamese.dyndns.org> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Fri, Feb 17, 2012 at 02:25:25PM -0800, Junio C Hamano wrote: > Jeff King 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