git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  newren@gmail.com,
	 Derrick Stolee <stolee@gmail.com>
Subject: Re: [PATCH 0/3] Integrate the sparse index with 'git apply' and 'git add -p/-i'
Date: Thu, 08 May 2025 11:26:27 -0700	[thread overview]
Message-ID: <xmqqecwz557w.fsf@gitster.g> (raw)
In-Reply-To: <pull.1914.git.1746579320.gitgitgadget@gmail.com> (Derrick Stolee via GitGitGadget's message of "Wed, 07 May 2025 00:55:17 +0000")

"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:

> The sparse index helps make some Git commands faster when using
> sparse-checkout in cone mode. However, not all code paths are aware that the
> index can have non-blob entries, so we are careful about rolling this
> feature out gradually. The cost of this rollout is that some commands are
> slower with the sparse index as they need to expand a sparse index into a
> full index in memory, which requires parsing tree objects to construct the
> full path list.
>
> This patch series focuses on the 'git add -p' command, which is slow with
> the sparse index for a couple of reasons, handled in the first two patches:
>
>  1. 'git add -p' uses 'git apply' as a subcommand and 'git apply' needs
>     integration with the sparse index. Luckily, we just need to add the repo
>     setting and appropriate tests to confirm it behaves as expected.
>  2. The interactive modes of 'git add' ('-p' and '-i') leave cmd_add()
>     before the code that sets the repo setting to allow for a sparse index.
>     Patch 2 fixes this and adds appropriate tests to confirm the behavior in
>     a sparse-checkout.
>
> A third patch adds a performance test to p2000-sparse-operations.sh to
> confirm that we are getting the performance improvement we expect:
>
>                         BASE    PATCH 1        PATCH 2
> ---------------------------------------------------------
> 2000.118: (full-v3)     0.80   0.84 +5.0%     0.84  +5.0%
> 2000.119: (full-v4)     0.76   0.79 +3.9%     0.80  +5.3%
> 2000.120: (sparse-v3)   2.09   1.39 -33.5%    0.07 -96.7%
> 2000.121: (sparse-v4)   2.09   1.39 -33.5%    0.07 -96.7%
>
>
> Thanks, -Stolee

As always, it is delight to read a well-written cover letter that
naturally convinces readers why the series is worth reading ;-)

Thanks.

  parent reply	other threads:[~2025-05-08 18:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07  0:55 [PATCH 0/3] Integrate the sparse index with 'git apply' and 'git add -p/-i' Derrick Stolee via GitGitGadget
2025-05-07  0:55 ` [PATCH 1/3] apply: integrate with the sparse index Derrick Stolee via GitGitGadget
2025-05-10  3:18   ` Elijah Newren
2025-05-16 12:49     ` Derrick Stolee
2025-05-07  0:55 ` [PATCH 2/3] git add: make -p/-i aware of " Derrick Stolee via GitGitGadget
2025-05-10  4:38   ` Elijah Newren
2025-05-16 12:54     ` Derrick Stolee
2025-05-07  0:55 ` [PATCH 3/3] p2000: add performance test for 'git add -p' Derrick Stolee via GitGitGadget
2025-05-10  4:39   ` Elijah Newren
2025-05-08 18:26 ` Junio C Hamano [this message]
2025-05-14 15:16 ` [PATCH 0/3] Integrate the sparse index with 'git apply' and 'git add -p/-i' Phillip Wood
2025-05-16 13:28   ` Derrick Stolee
2025-05-20 15:07     ` phillip.wood123
2025-05-16 14:55 ` [PATCH v2 0/4] Integrate the sparse index with 'git apply' and interactive add, checkout, and reset Derrick Stolee via GitGitGadget
2025-05-16 14:55   ` [PATCH v2 1/4] apply: integrate with the sparse index Derrick Stolee via GitGitGadget
2025-05-16 14:55   ` [PATCH v2 2/4] git add: make -p/-i aware of " Derrick Stolee via GitGitGadget
2025-05-16 14:55   ` [PATCH v2 3/4] reset: integrate sparse index with --patch Derrick Stolee via GitGitGadget
2025-05-16 16:20     ` Elijah Newren
2025-05-16 14:55   ` [PATCH v2 4/4] p2000: add performance test for patch-mode commands Derrick Stolee via GitGitGadget
2025-05-16 15:32   ` [PATCH v2 0/4] Integrate the sparse index with 'git apply' and interactive add, checkout, and reset Elijah Newren
2025-05-16 16:35     ` Derrick Stolee
2025-05-16 18:55     ` 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=xmqqecwz557w.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=newren@gmail.com \
    --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.
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).