From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id D55851F619 for ; Sat, 21 Mar 2020 05:04:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727158AbgCUFE5 (ORCPT ); Sat, 21 Mar 2020 01:04:57 -0400 Received: from cloud.peff.net ([104.130.231.41]:45966 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1725440AbgCUFE4 (ORCPT ); Sat, 21 Mar 2020 01:04:56 -0400 Received: (qmail 8104 invoked by uid 109); 21 Mar 2020 05:04:56 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with SMTP; Sat, 21 Mar 2020 05:04:56 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 14864 invoked by uid 111); 21 Mar 2020 05:14:39 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Sat, 21 Mar 2020 01:14:39 -0400 Authentication-Results: peff.net; auth=none Date: Sat, 21 Mar 2020 01:04:55 -0400 From: Jeff King To: Junio C Hamano Cc: Taylor Blau , git@vger.kernel.org, dstolee@microsoft.com Subject: Re: [PATCH 0/1] commit-graph: avoid unnecessary tag deference when merging Message-ID: <20200321050455.GB1438317@coredump.intra.peff.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Mar 20, 2020 at 09:56:16PM -0700, Junio C Hamano wrote: > Taylor Blau writes: > > > This patch avoids an unnecessary tag dereference in > > 'merge_commit_graph()', which can improve the running time of a > > commit-graph write by around ~7.4% on average. > > That I suspect depends heavily on what portion of your total > committishes consist of tags, no (in an absurdly extreme case, if > there is no tag in the repository, there won't be any improvement)? > > What tag-vs-commit ratio is the above "average" number based on? I think the point is that in this code path we've already identified the candidates as commits (because they were in an existing commit-graph file), so treating the items as a committishes in the first place is unnecessary. If an object isn't itself a commit, we should be dropping it from the proposed output (possibly we ought to give a warning in such a case, too, as it indicates the previous writer did something wrong). -Peff