git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Dirk Gouders <dirk@gouders.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Emily Shaffer <emilyshaffer@google.com>,
	Kyle Lippincott <spectral@google.com>
Subject: Re: [PATCH v4 4/5] MyFirstObjectWalk: fix description for counting omitted objects
Date: Tue, 26 Mar 2024 21:09:08 +0100	[thread overview]
Message-ID: <gh34scvjq3.fsf@gouders.net> (raw)
In-Reply-To: <xmqqo7b1apx3.fsf@gitster.g> (Junio C. Hamano's message of "Tue, 26 Mar 2024 10:00:56 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Dirk Gouders <dirk@gouders.net> writes:
>
>> diff --git a/Documentation/MyFirstObjectWalk.txt b/Documentation/MyFirstObjectWalk.txt
>> index a06c712e46..6901561263 100644
>> --- a/Documentation/MyFirstObjectWalk.txt
>> +++ b/Documentation/MyFirstObjectWalk.txt
>> @@ -754,10 +754,12 @@ points to the same tree object as its grandparent.)
>>  === Counting Omitted Objects
>>  
>>  We also have the capability to enumerate all objects which were omitted by a
>> -filter, like with `git log --filter=<spec> --filter-print-omitted`. Asking
>> -`traverse_commit_list_filtered()` to populate the `omitted` list means that our
>> -object walk does not perform any better than an unfiltered object walk; all
>> -reachable objects are walked in order to populate the list.
>> +filter, like with `git log --filter=<spec> --filter-print-omitted`. To do this,
>> +change `traverse_commit_list()` to `traverse_commit_list_filtered()`, which is
>> +able to populate an `omitted` list.  This list of filtered objects may have
>> +performance implications, however, because despite filtering objects, the possibly
>> +much larger set of all reachable objects must be processed in order to
>> +populate that list.
>
> It may be just me not reading what is obvious to everybody else
> clearly, in which case I am happy to take the above text as-is, but
> the updated text that says a "list" may have "performance
> implications" reads a bit odd.  It would be understandable if you
> said "asking for list of filtered objects may have", though.

Oh yes, you are right (as far as I can say): I would change this to
something like:

"Asking for this list of filtered objects may cause performance
implications, however, because in this case, despite filtering objects,
the possibly much larger set of all reachable objects must be processed
in order to populate that list."

(Later in the document, it is suggested to do timing with the two
versions, which kind of follows up on the performance impact that is
focused on, here.  So, this doesn't remain an unresolved detail.)

> Are you contrasting a call to traverse_commit_list() and
> traverse_commit_list_filtered() and discussing their relative
> performance?  
>
> Of are you contrasting a call to traverse_commit_list_filtered()
> with and without the omitted parameter, and saying that a call with
> omitted parameter asks the machinery to do more work so it has to
> cost more?

This answer has the potential to cause an enhancement request, anyway:

Previously, the document didn't state that
traverse_commit_list_filtered() can be used without asking for a
`omitted` list (and I didn't change that), so the contrasting
in my understanding explicitely is traverse_commit_list()
vs. traverse_commit_list_filtered().

The second of your cases is only included implicitely, for those who
know or can guess they could use NULL as the pointer to `omitted` list.

Thank you for looking at this one more time!

Dirk

> Other than that I had no trouble with this latest round.
>
> Thanks.


  reply	other threads:[~2024-03-26 20:10 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 21:36 [PATCH 0/5] Fixes for Documentation/MyFirstObjectWalk.txt Dirk Gouders
2024-03-11 10:11 ` [PATCH 1/5] MyFirstObjectWalk: use additional arg in config_fn_t Dirk Gouders
2024-03-12  0:18   ` Junio C Hamano
2024-03-11 10:26 ` [PATCH 2/5] MyFirstObjectWalk: fix misspelled "builtins/" Dirk Gouders
2024-03-11 12:47 ` [PATCH 3/5] MyFirstObjectWalk: fix filtered object walk Dirk Gouders
2024-03-11 13:29 ` [PATCH 4/5] MyFirstObjectWalk: fix description for counting omitted objects Dirk Gouders
2024-03-11 21:00 ` [PATCH 5/5] MyFirstObjectWalk: add stderr to pipe processing Dirk Gouders
2024-03-12  0:13   ` Junio C Hamano
2024-03-12 14:27     ` Dirk Gouders
2024-03-12 19:29       ` Junio C Hamano
2024-03-12  0:15 ` [PATCH 0/5] Fixes for Documentation/MyFirstObjectWalk.txt Junio C Hamano
2024-03-19 11:23 ` [PATCH v2 " Dirk Gouders
2024-03-19 11:23   ` [PATCH v2 1/5] MyFirstObjectWalk: use additional arg in config_fn_t Dirk Gouders
2024-03-23 19:28     ` Kyle Lippincott
2024-03-19 11:23   ` [PATCH v2 2/5] MyFirstObjectWalk: fix misspelled "builtins/" Dirk Gouders
2024-03-19 11:23   ` [PATCH v2 3/5] MyFirstObjectWalk: fix filtered object walk Dirk Gouders
2024-03-19 11:23   ` [PATCH v2 4/5] MyFirstObjectWalk: fix description for counting omitted objects Dirk Gouders
2024-03-23 21:59     ` Kyle Lippincott
2024-03-23 22:46       ` Dirk Gouders
2024-03-19 11:23   ` [PATCH v2 5/5] MyFirstObjectWalk: add stderr to pipe processing Dirk Gouders
2024-03-23 19:48     ` Kyle Lippincott
2024-03-23 20:16       ` Dirk Gouders
2024-03-23 22:00   ` [PATCH v2 0/5] Fixes for Documentation/MyFirstObjectWalk.txt Kyle Lippincott
2024-03-23 23:06     ` Dirk Gouders
2024-03-24  2:20       ` Junio C Hamano
2024-03-25 12:33   ` [PATCH v3 " Dirk Gouders
2024-03-25 12:33     ` [PATCH v3 1/5] MyFirstObjectWalk: use additional arg in config_fn_t Dirk Gouders
2024-03-25 17:16       ` Junio C Hamano
2024-03-25 19:50         ` Dirk Gouders
2024-03-25 12:33     ` [PATCH v3 2/5] MyFirstObjectWalk: fix misspelled "builtins/" Dirk Gouders
2024-03-25 12:33     ` [PATCH v3 3/5] MyFirstObjectWalk: fix filtered object walk Dirk Gouders
2024-03-25 12:33     ` [PATCH v3 4/5] MyFirstObjectWalk: fix description for counting omitted objects Dirk Gouders
2024-03-25 17:25       ` Junio C Hamano
2024-03-25 20:07         ` Dirk Gouders
2024-03-25 21:25           ` Junio C Hamano
2024-03-25 20:59         ` Kyle Lippincott
2024-03-25 12:33     ` [PATCH v3 5/5] MyFirstObjectWalk: add stderr to pipe processing Dirk Gouders
2024-03-25 17:05     ` [PATCH v3 0/5] Fixes for Documentation/MyFirstObjectWalk.txt Kyle Lippincott
2024-03-25 20:07       ` Dirk Gouders
2024-03-25 17:50     ` Junio C Hamano
2024-03-25 18:01       ` Kyle Lippincott
2024-03-25 20:22       ` Dirk Gouders
2024-03-26 13:08     ` [PATCH v4 " Dirk Gouders
2024-03-27  1:04       ` Kyle Lippincott
2024-03-27  6:25         ` Dirk Gouders
2024-03-27 11:22       ` [PATCH v5 " Dirk Gouders
2024-03-27 11:22         ` [PATCH v5 1/5] MyFirstObjectWalk: use additional arg in config_fn_t Dirk Gouders
2024-03-27 11:22         ` [PATCH v5 2/5] MyFirstObjectWalk: fix misspelled "builtins/" Dirk Gouders
2024-03-27 11:22         ` [PATCH v5 3/5] MyFirstObjectWalk: fix filtered object walk Dirk Gouders
2024-03-27 11:22         ` [PATCH v5 4/5] MyFirstObjectWalk: fix description for counting omitted objects Dirk Gouders
2024-03-27 11:22         ` [PATCH v5 5/5] MyFirstObjectWalk: add stderr to pipe processing Dirk Gouders
2024-03-26 13:08     ` [PATCH v4 1/5] MyFirstObjectWalk: use additional arg in config_fn_t Dirk Gouders
2024-03-26 13:08     ` [PATCH v4 2/5] MyFirstObjectWalk: fix misspelled "builtins/" Dirk Gouders
2024-03-26 13:08     ` [PATCH v4 3/5] MyFirstObjectWalk: fix filtered object walk Dirk Gouders
2024-03-26 13:08     ` [PATCH v4 4/5] MyFirstObjectWalk: fix description for counting omitted objects Dirk Gouders
2024-03-26 17:00       ` Junio C Hamano
2024-03-26 20:09         ` Dirk Gouders [this message]
2024-03-26 20:24           ` Junio C Hamano
2024-03-27  6:30             ` Dirk Gouders
2024-03-26 13:08     ` [PATCH v4 5/5] MyFirstObjectWalk: add stderr to pipe processing Dirk Gouders

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=gh34scvjq3.fsf@gouders.net \
    --to=dirk@gouders.net \
    --cc=emilyshaffer@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spectral@google.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).