From: Junio C Hamano <gitster@pobox.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: git@vger.kernel.org, pclouds@gmail.com
Subject: Re: [PATCH] list-objects: mark fewer commits as edges for non-shallow clones
Date: Thu, 11 Dec 2014 11:13:30 -0800 [thread overview]
Message-ID: <xmqqvblidmp1.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1418269615-139571-1-git-send-email-sandals@crustytoothpaste.net> (brian m. carlson's message of "Thu, 11 Dec 2014 03:46:55 +0000")
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
> In commit fbd4a70 (list-objects: mark more commits as edges in
> mark_edges_uninteresting - 2013-08-16), we made --thin much more
> aggressive by reading lots more trees. This produces much smaller packs
> for shallow clones; however, it causes a significant performance
> regression for non-shallow clones with lots of refs (23.322 seconds vs.
> 4.785 seconds with 22400 refs). Limit this extra edge-marking to
> shallow clones to avoid poor performance.
This change affects non-clone/fetch uses of object listing depending
on the shallowness of the repository, and does not even care if it
is driven as part of the pack-object codepath, if I am reading it
correctly. It smells wrong.
The problematic fbd4a70 already had unintended fallout that needed
to be corrected with 200abe74 (list-objects: only look at cmdline
trees with edge_hint, 2014-01-20). The current code with the fix,
the decision to use the more expensive marking is tied to
"edge_hint". I notice that edge_hint is turned on only if the caller
of rev-list passes the "--objects-edge" option, and currently that
only happens in the pack-objects codepath when "thin" is given.
Perhaps that part should decide if it really wants to do edge_hint
depending on the shallowness of the repository perhaps?
That is, something like this instead?
builtin/pack-objects.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 3f9f5c7..a9ebf56 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -2709,7 +2709,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
usage_with_options(pack_usage, pack_objects_options);
argv_array_push(&rp, "pack-objects");
- if (thin) {
+ if (thin && is_repository_shallow()) {
use_internal_rev_list = 1;
argv_array_push(&rp, "--objects-edge");
} else
next prev parent reply other threads:[~2014-12-11 19:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-10 0:37 Poor push performance with large number of refs brian m. carlson
2014-12-10 5:41 ` Shawn Pearce
2014-12-10 23:34 ` brian m. carlson
2014-12-10 23:49 ` [PATCH] push: add remote.pushThin to control thin pack generation brian m. carlson
2014-12-11 0:43 ` brian m. carlson
2014-12-11 1:41 ` Poor push performance with large number of refs Duy Nguyen
2014-12-11 3:09 ` brian m. carlson
2014-12-11 3:46 ` [PATCH] list-objects: mark fewer commits as edges for non-shallow clones brian m. carlson
2014-12-11 10:51 ` Duy Nguyen
2014-12-20 22:18 ` brian m. carlson
2014-12-11 19:13 ` Junio C Hamano [this message]
2014-12-11 19:26 ` Junio C Hamano
2014-12-20 19:28 ` brian m. carlson
2014-12-10 9:17 ` Poor push performance with large number of refs Duy Nguyen
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=xmqqvblidmp1.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=sandals@crustytoothpaste.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.