public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: phillip.wood123@gmail•com
To: Derrick Stolee <stolee@gmail•com>,
	phillip.wood@dunelm•org.uk,
	Derrick Stolee via GitGitGadget <gitgitgadget@gmail•com>,
	git@vger•kernel.org
Cc: gitster@pobox•com, newren@gmail•com
Subject: Re: [PATCH 0/3] Integrate the sparse index with 'git apply' and 'git add -p/-i'
Date: Tue, 20 May 2025 16:07:18 +0100	[thread overview]
Message-ID: <028c2c85-5b60-4ede-ad01-5faeb13898c6@gmail.com> (raw)
In-Reply-To: <6736f2fd-a91d-4ffd-b421-6670a0e028d8@gmail.com>

On 16/05/2025 14:28, Derrick Stolee wrote:
> On 5/14/25 11:16 AM, Phillip Wood wrote:
> 
>> This made me wonder about the other commands that take "--patch" like 
>> checkout and reset. Do you know how well they handle the sparse index? 
>> They'll all benefit from the changes to git apply in this series but I 
>> was wondering if they need any further changes.
> By adding these two tests...
> 
>    test_perf_on_all 'test_write_lines y y y | git checkout --patch -'
>    test_perf_on_all 'echo >>a && git add a && test_write_lines y | git 
> reset --patch'
> 
> ...we can demonstrate that the changes to 'git apply' are sufficient
> to get the improvements we seek for 'git checkout --patch':
> 
> Test                                   HEAD~3   HEAD~2
> ---------------------------------------------------------------
> ... git checkout --patch - (full-v3)     1.22   1.22  +0.0%
> ... git checkout --patch - (full-v4)     1.15   1.16  +0.9%
> ... git checkout --patch - (sparse-v3)   1.37   0.11 -92.0%
> ... git checkout --patch - (sparse-v4)   1.37   0.11 -92.0%
> ... git reset --patch (full-v3)          0.82   0.81  -1.2%
> ... git reset --patch (full-v4)          0.76   0.77  +1.3%
> ... git reset --patch (sparse-v3)        1.57   0.91 -42.0%
> ... git reset --patch (sparse-v4)        1.59   0.92 -42.1%
> 
> But 'git reset --patch' appears to not be fast _enough_. It turns
> out that it has the same issue as cmd_add(). I'll add a patch for
> this purpose.

That's great, I don't have anymore comments on v2 of this series.

Thanks

Phillip


  reply	other threads:[~2025-05-20 15:07 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 ` [PATCH 0/3] Integrate the sparse index with 'git apply' and 'git add -p/-i' Junio C Hamano
2025-05-14 15:16 ` Phillip Wood
2025-05-16 13:28   ` Derrick Stolee
2025-05-20 15:07     ` phillip.wood123 [this message]
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=028c2c85-5b60-4ede-ad01-5faeb13898c6@gmail.com \
    --to=phillip.wood123@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitgitgadget@gmail$(echo .)com \
    --cc=gitster@pobox$(echo .)com \
    --cc=newren@gmail$(echo .)com \
    --cc=phillip.wood@dunelm$(echo .)org.uk \
    --cc=stolee@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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