From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [IPv6:2604:1380:40f1:3f00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 056DA1F44D for ; Tue, 26 Mar 2024 20:10:13 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=gouders.net header.i=@gouders.net header.a=rsa-sha256 header.s=gnet header.b=CRavASKp; dkim-atps=neutral Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 37808B28501 for ; Tue, 26 Mar 2024 20:10:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63C9B13D536; Tue, 26 Mar 2024 20:09:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gouders.net header.i=@gouders.net header.b="CRavASKp" Received: from mx10.gouders.net (mx10.gouders.net [202.61.206.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32F1513D26D for ; Tue, 26 Mar 2024 20:09:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.61.206.94 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711483777; cv=none; b=qmd+SHb+pA2LXQ7LTd7Ri7HQdlCWKkw4nZMf9bfRKjojlV2o1WFRCTLMtdmNK7EkyPT6PdPkyjvqaj2F+CpYsj4bcTltKLH3k566ImHFQiUsARW01vfmuDilvVJlL0n5jSd0mTKzzUlTMKM+UiHMq8PDFwNDCrArxBCVJ2CrdwA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711483777; c=relaxed/simple; bh=I4jIBfqXrZZIJkAeSolohLn+IoWAlTCzt2BNLSa0EdQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=K6UWLodo9FJRq69Xa07cThtPRKUH72SW9MjGHm20T1pK94aSoeULZvIAYD0GAYUNqme2d/aR94Cf61GY4mI0W9Dg2RmH6OIDBPgxTZzNHnPHFXMKSyGzhHkhLMV+/f2Nf3bMn+TiRAckFpRBTTNYwzmzhGj38RlYxLNaKcQK3Fw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gouders.net; spf=pass smtp.mailfrom=gouders.net; dkim=pass (1024-bit key) header.d=gouders.net header.i=@gouders.net header.b=CRavASKp; arc=none smtp.client-ip=202.61.206.94 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gouders.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gouders.net Received: from localhost (ip-109-42-178-117.web.vodafone.de [109.42.178.117]) (authenticated bits=0) by mx10.gouders.net (8.17.1.9/8.17.1.9) with ESMTPSA id 42QK9DLt024754 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 26 Mar 2024 21:09:14 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gouders.net; s=gnet; t=1711483754; bh=I4jIBfqXrZZIJkAeSolohLn+IoWAlTCzt2BNLSa0EdQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=CRavASKp737BeXfpN1aKHRdYzIyD19JvAGU3TSwo0VPpHusAWyCN3Z6pfe3fzAhzQ g+20wOn63xgEsxQbcuf5ZBx+IZLtj34Zo8i50YCFma7D+BiL2QyFwqw3ix/Nj1OKF0 LNOaYZSQys83L2tRz6aRS0kT8cNQNJD/eHA6vNtY= From: Dirk Gouders To: Junio C Hamano Cc: git@vger.kernel.org, Emily Shaffer , Kyle Lippincott Subject: Re: [PATCH v4 4/5] MyFirstObjectWalk: fix description for counting omitted objects In-Reply-To: (Junio C. Hamano's message of "Tue, 26 Mar 2024 10:00:56 -0700") References: <20240326130902.7111-5-dirk@gouders.net> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Tue, 26 Mar 2024 21:09:08 +0100 Message-ID: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Junio C Hamano writes: > Dirk Gouders 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= --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= --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.