All of lore.kernel.org
 help / color / mirror / Atom feed
From: Derrick Stolee <derrickstolee@github.com>
To: Jeff King <peff@peff.net>, Junio C Hamano <junio@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: ds/midx-with-less-memory
Date: Wed, 27 Jul 2022 07:29:22 -0400	[thread overview]
Message-ID: <1b2f7486-faeb-c71e-76c4-1afce2a1519d@github.com> (raw)
In-Reply-To: <YuBlD3o5bYMg8f6i@coredump.intra.peff.net>

On 7/26/22 6:05 PM, Jeff King wrote:
> On Fri, Jul 22, 2022 at 06:01:10PM -0700, Junio C Hamano wrote:
> 
>> * ds/midx-with-less-memory (2022-07-19) 3 commits
>>   (merged to 'next' on 2022-07-20 at 250d257c3e)
>>  + midx: reduce memory pressure while writing bitmaps
>>  + midx: extract bitmap write setup
>>  + pack-bitmap-write: use const for hashes
>>
>>  The codepath to write multi-pack index has been taught to release a
>>  large chunk of memory that holds an array of objects in the packs,
>>  as soon as it is done with the array, to reduce memory consumption.
>>
>>  Will merge to 'master'.
>>  source: <pull.1292.v2.git.1658244366.gitgitgadget@gmail.com>
> 
> This topic looks very nice, but I think we might want this additional
> cleanup on top:
> 
> -- >8 --
> Subject: [PATCH] write_midx_bitmap(): drop unused refs_snapshot parameter
> 
> The refactoring in 90b2bb710d (midx: extract bitmap write setup,
> 2022-07-19) hoisted our call to find_commits_for_midx_bitmap() into the
> caller, which means we no longer need to see the refs_snapshot at all.

Good find! I'm happy to see the unused parameter work is coming
along ;)

> @@ -1059,7 +1059,6 @@ static int write_midx_bitmap(const char *midx_name,
>  			     struct commit **commits,
>  			     uint32_t commits_nr,
>  			     uint32_t *pack_order,
> -			     const char *refs_snapshot,
>  			     unsigned flags)
>  {
>  	int ret, i;
> @@ -1462,7 +1461,7 @@ static int write_midx_internal(const char *object_dir,
>  
>  		if (write_midx_bitmap(midx_name.buf, midx_hash, &pdata,
>  				      commits, commits_nr, ctx.pack_order,
> -				      refs_snapshot, flags) < 0) {
> +				      flags) < 0) {
>  			error(_("could not write multi-pack bitmap"));
>  			result = 1;
>  			goto cleanup;

Thanks for the patch!

-Stolee

  reply	other threads:[~2022-07-27 11:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23  1:01 What's cooking in git.git (Jul 2022, #07; Fri, 22) Junio C Hamano
2022-07-23  2:28 ` en/merge-restore-to-pristine (Was: Re: What's cooking in git.git (Jul 2022, #07; Fri, 22)) Elijah Newren
2022-07-23 13:48 ` mt/doc-config " Matheus Tavares
2022-07-25 21:56 ` tb/commit-graph-genv2-upgrade-fix Taylor Blau
2022-07-26 11:29   ` tb/commit-graph-genv2-upgrade-fix Derrick Stolee
2022-07-26 22:05 ` ds/midx-with-less-memory Jeff King
2022-07-27 11:29   ` Derrick Stolee [this message]
2022-07-27 15:10   ` ds/midx-with-less-memory Junio C Hamano
2022-07-27 19:12     ` ds/midx-with-less-memory 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b2f7486-faeb-c71e-76c4-1afce2a1519d@github.com \
    --to=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=junio@pobox.com \
    --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 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.