git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Dr N.W. Filardo" <nwf20@cam.ac.uk>
To: Derrick Stolee <stolee@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/4] repack: add --sparse and pass to pack-objects
Date: Tue, 12 Mar 2019 14:03:16 +0000	[thread overview]
Message-ID: <ad762ef2fbe9f268068b9a406070591b@cam.ac.uk> (raw)
In-Reply-To: <f26c68df-8895-2a2d-0175-5fa3581ab45a@gmail.com>

On 2019-03-12 13:47, Derrick Stolee wrote:
> On 3/12/2019 9:18 AM, Nathaniel Filardo wrote:
>> The sparse connectivity algorithm saves a whole lot of time when there
>> are UNINTERESTING trees around.
> 
> Interesting! Do you have some performance numbers to include with
> this statement?

Not UNINTERESTING? ;)

Not directly, no, but the performance numbers reported for the next 
patch in
the series hinge on using sparse reachability.  It seemed like a good 
idea to
expose this knob through repack even if one isn't going to use the
--assume-pack-keep-transitive flag introduced in the next patch.

>> @@ -48,6 +49,10 @@ static int repack_config(const char *var, const 
>> char *value, void *cb)
>>  		use_delta_islands = git_config_bool(var, value);
>>  		return 0;
>>  	}
>> +	if (!strcmp(var, "pack.usesparse")) {
>> +		sparse = git_config_bool(var, value);
>> +		return 0;
>> +	}
> 
> This part is not handled inside of `pack-objects`. Since you are not
> sending '--no-sparse' when the variable 'sparse' is zero, the config
> setting will automatically be picked up by the pack-objects builtin.

OK, I will drop this hunk.

> Now, a question of whether you _should_ allow the '--no-sparse' option
> in the 'repack' command, and send it along to the inner command (when
> it is present) is another question.

I'm inclined to say yes, but am open to suggestions. :)

>> @@ -366,6 +374,8 @@ int cmd_repack(int argc, const char **argv, const 
>> char *prefix)
>>  	argv_array_push(&cmd.args, "--all");
>>  	argv_array_push(&cmd.args, "--reflog");
>>  	argv_array_push(&cmd.args, "--indexed-objects");
>> +	if (sparse)
>> +		argv_array_push(&cmd.args, "--sparse");
>>  	if (repository_format_partial_clone)
>>  		argv_array_push(&cmd.args, "--exclude-promisor-objects");
>>  	if (write_bitmaps)
>> 
> 
> How about a test with this new option? You can probably just add to
> t5322-pack-objects-sparse.sh.

Can do.

Cheers,
--nwf;


  reply	other threads:[~2019-03-12 14:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12 13:18 [PATCH 0/4] Speed up repacking when lots of pack-kept objects Nathaniel Filardo
2019-03-12 13:18 ` [PATCH 1/4] count-objects: report statistics about kept packs Nathaniel Filardo
2019-03-12 13:18 ` [PATCH 2/4] revision walk: optionally use sparse reachability Nathaniel Filardo
2019-03-12 13:59   ` Derrick Stolee
2019-03-12 13:18 ` [PATCH 3/4] repack: add --sparse and pass to pack-objects Nathaniel Filardo
2019-03-12 13:47   ` Derrick Stolee
2019-03-12 14:03     ` Dr N.W. Filardo [this message]
2019-03-12 13:18 ` [PATCH 4/4] repack: optionally assume transitive kept packs Nathaniel Filardo

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=ad762ef2fbe9f268068b9a406070591b@cam.ac.uk \
    --to=nwf20@cam.ac.uk \
    --cc=git@vger.kernel.org \
    --cc=stolee@gmail.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).