From: Jonathan Tan <jonathantanmy@google.com>
To: steadmon@google.com
Cc: git@vger.kernel.org, Jonathan Tan <jonathantanmy@google.com>
Subject: Re: [PATCH] clone: do faster object check for partial clones
Date: Wed, 3 Apr 2019 11:58:10 -0700 [thread overview]
Message-ID: <20190403185810.8787-1-jonathantanmy@google.com> (raw)
In-Reply-To: <6de682d5e48186970644569586fc6613763d5caa.1554312374.git.steadmon@google.com>
> For partial clones, doing a full connectivity check is wasteful; we skip
> promisor objects (which, for a partial clone, is all known objects), and
> excluding them all from the connectivity check can take a significant
> amount of time on large repos.
Instead of "excluding them all", I would word this as "enumerating them
all so that we can exclude them" - the enumerating is the slow part, not
the excluding (which actually makes things faster).
> + if (opt->check_refs_only) {
> + /*
> + * For partial clones, we don't want to walk the full commit
> + * graph because we're skipping promisor objects anyway. We
> + * should just check that objects referenced by wanted refs were
> + * transferred.
The enumeration of promisor objects to be excluded is done through
for_each_packed_object() (see is_promisor_object()), not through walking
the commit graph. Maybe reword this comment to be similar to what I've
suggested for the commit message.
> @@ -46,6 +46,14 @@ struct check_connected_options {
> * during a fetch.
> */
> unsigned is_deepening_fetch : 1;
> +
> + /*
> + * If non-zero, only check the top-level objects referenced by the
> + * wanted refs (passed in as cb_data). This is useful for partial
> + * clones, where this can be much faster than excluding all promisor
> + * objects prior to walking the commit graph.
> + */
> + unsigned check_refs_only : 1;
> };
Same enumerating vs excluding comment as before.
Aside from that: thinking from scratch, we want something that tells
check_connected() to avoid anything that enumerates the list of promised
objects, since the objects that we're checking are all promisor objects,
and thus any outgoing links are automatically promised. I would include
some of this explanation in the comment, but in the interest of trying
to avoid a bikeshedding discussion, I don't consider this necessary.
next prev parent reply other threads:[~2019-04-03 18:58 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 17:27 [PATCH] clone: do faster object check for partial clones Josh Steadmon
2019-04-03 18:58 ` Jonathan Tan [this message]
2019-04-03 19:41 ` Jeff King
2019-04-03 20:57 ` Jonathan Tan
2019-04-04 0:21 ` Josh Steadmon
2019-04-04 1:33 ` Jeff King
2019-04-04 22:53 ` [PATCH v2] rev-list: exclude promisor objects at walk time Josh Steadmon
2019-04-04 23:08 ` Jeff King
2019-04-04 23:47 ` Josh Steadmon
2019-04-05 0:00 ` Jeff King
2019-04-05 0:09 ` Josh Steadmon
2019-04-08 20:59 ` Josh Steadmon
2019-04-08 21:06 ` [PATCH v3] " Josh Steadmon
2019-04-08 22:23 ` Christian Couder
2019-04-08 23:12 ` Josh Steadmon
2019-04-09 15:14 ` Junio C Hamano
2019-04-09 15:15 ` Jeff King
2019-04-09 15:43 ` Junio C Hamano
2019-04-09 16:35 ` Josh Steadmon
2019-04-09 18:04 ` SZEDER Gábor
2019-04-09 23:42 ` Josh Steadmon
2019-04-11 4:06 ` Jeff King
2019-04-12 22:38 ` Josh Steadmon
2019-04-13 5:34 ` Jeff King
2019-04-19 20:26 ` Josh Steadmon
2019-04-19 21:00 ` [PATCH v4] clone: do faster object check for partial clones Josh Steadmon
2019-04-22 21:31 ` Jeff King
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190403185810.8787-1-jonathantanmy@google.com \
--to=jonathantanmy@google.com \
--cc=git@vger.kernel.org \
--cc=steadmon@google.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).