git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Jens Lehmann <Jens.Lehmann@web.de>,
	git@vger.kernel.org, git-dev@github.com
Subject: Re: [PATCH] fetch: avoid quadratic loop checking for updated submodules
Date: Mon, 12 Sep 2011 16:33:22 -0700	[thread overview]
Message-ID: <7vsjo11gl9.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20110912224934.GA28994@sigill.intra.peff.net> (Jeff King's message of "Mon, 12 Sep 2011 18:49:34 -0400")

Jeff King <peff@peff.net> writes:

> To be honest, the whole submodule recursion thing seems a bit confusing
> to me....
> So since we must accept that we can't necessarily get every intermediate
> step, I wonder if we are simply better off diffing the "before" and
> "after" state of a particular ref, rather than traversing.

Yes, exactly my thought.

It would be far cheaper to look at a single final tree and enumerate all
the submodules, which would give you pessimistically the maximum set that
could possibly be relevant, than running millions of pairwise diff trees.

By the way, I think the submodule traversal won't hurt the correctness of
the primary traversal because that happens _after_ we fetch the object
stream.

The submodule traversal _may_ be getting an incorrect result, though, for
the same reason.

  parent reply	other threads:[~2011-09-12 23:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-12 19:56 [PATCH] fetch: avoid quadratic loop checking for updated submodules Jeff King
2011-09-12 20:21 ` Junio C Hamano
2011-09-13 19:34   ` Jens Lehmann
2011-09-14 18:26     ` Jens Lehmann
2011-09-12 21:25 ` Junio C Hamano
2011-09-12 22:49   ` Jeff King
2011-09-12 23:06     ` Junio C Hamano
2011-09-12 23:25       ` Jeff King
2011-09-12 23:33     ` Junio C Hamano [this message]
2011-09-13 19:13     ` Jens Lehmann
2011-09-13 22:17       ` Jeff King
2011-09-14 13:20         ` Marc Branchaud
2011-09-14 18:27         ` Jens Lehmann
2011-09-14 18:29           ` Jeff King
2011-09-13 16:40 ` Christian Couder
2011-09-13 17:15   ` Jeff King
2011-09-13 17:34     ` Junio C Hamano

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=7vsjo11gl9.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git-dev@github.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).