From: Derrick Stolee <stolee@gmail.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org, Thomas Rast <tr@thomasrast.ch>
Subject: Re: [PATCH 2/2] line-log: avoid unnecessary full tree diffs
Date: Thu, 22 Aug 2019 12:51:46 -0400 [thread overview]
Message-ID: <09b86c6c-234e-f6e9-c0c7-a810b8214bcf@gmail.com> (raw)
In-Reply-To: <20190822162656.GE20404@szeder.dev>
On 8/22/2019 12:26 PM, SZEDER Gábor wrote:
> On Thu, Aug 22, 2019 at 09:01:44AM -0700, Junio C Hamano wrote:
>> SZEDER Gábor <szeder.dev@gmail.com> writes:
>>
>>> Well, that fruit hung much lower than I though, just look at the size
>>> of the WIP patch below. I just hope that there are no unexpected
>>> surprises, but FWIW it produces the exact same output for all files up
>>> to 't/t5515' in v2.23.0 as the previous patch.
>>>
>>> Can't wait to see how it fares with that evil Windows path :)
>>>
>>> --- >8 ---
>>>
>>> Subject: [PATCH 3/2] WIP line-log: stop diff-ing after first TREESAME merge parent
>>
>> A quick question. That we need "stop diffing after first treesame"
>> patch in the first place means we have always been attempting to
>> follow all the parents of a merge?
>
> To follow, no.
>
> But there are two subsequent loops: the first loop computed the diffs
> between the merge and each of its parents, while the second processed
> those diffs, and returned as soon as it found a treesame parent,
> without following the others.
>
> This patch unified those two loops so it computes the diff with the
> first parent, and then processes that diff right away, and returns if
> treesame, thereby avoding diffing the remaining parents.
The change you've proposed could be made a bit better in the following
way: first look for a treesame parent by computing the diffs without
rename detection. Re-enable rename detection only if no treesame parent
is found.
That would be sure to avoid the rename detection even if the merge has
a treesame second parent.
Thanks,
-Stolee
next prev parent reply other threads:[~2019-08-22 16:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 11:04 [PATCH 0/2] line-log: avoid unnecessary full tree diffs SZEDER Gábor
2019-08-21 11:04 ` [PATCH 1/2] line-log: extract pathspec parsing from line ranges into a helper function SZEDER Gábor
2019-08-21 11:04 ` [PATCH 2/2] line-log: avoid unnecessary full tree diffs SZEDER Gábor
2019-08-21 15:53 ` Derrick Stolee
2019-08-21 17:35 ` SZEDER Gábor
2019-08-21 18:12 ` Derrick Stolee
2019-08-22 8:41 ` SZEDER Gábor
2019-08-22 14:53 ` Derrick Stolee
2019-08-22 16:01 ` Junio C Hamano
2019-08-22 16:26 ` SZEDER Gábor
2019-08-22 16:51 ` Derrick Stolee [this message]
2019-08-23 10:04 ` SZEDER Gábor
2019-08-21 17:29 ` 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
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=09b86c6c-234e-f6e9-c0c7-a810b8214bcf@gmail.com \
--to=stolee@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=szeder.dev@gmail.com \
--cc=tr@thomasrast.ch \
/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).