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: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 27AF31F8C6 for ; Thu, 5 Aug 2021 20:42:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241095AbhHEUm5 (ORCPT ); Thu, 5 Aug 2021 16:42:57 -0400 Received: from cloud.peff.net ([104.130.231.41]:40776 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237913AbhHEUm4 (ORCPT ); Thu, 5 Aug 2021 16:42:56 -0400 Received: (qmail 12777 invoked by uid 109); 5 Aug 2021 20:42:41 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Thu, 05 Aug 2021 20:42:41 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 7376 invoked by uid 111); 5 Aug 2021 20:42:42 -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; Thu, 05 Aug 2021 16:42:42 -0400 Authentication-Results: peff.net; auth=none Date: Thu, 5 Aug 2021 16:42:40 -0400 From: Jeff King To: Patrick Steinhardt Cc: git@vger.kernel.org Subject: Re: [PATCH] fetch-pack: speed up loading of refs via commit graph Message-ID: References: <08519b8ab6f395cffbcd5e530bfba6aaf64241a2.1628085347.git.ps@pks.im> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Thu, Aug 05, 2021 at 01:53:50PM +0200, Patrick Steinhardt wrote: > I've put some more time into this. If rebased on top of v4 of [1], then > we can also use `parse_commit_in_graph_gently()` to further speed this > up from 15.8 seconds to 11.6 seconds with below patch. It's the same > memory/speed tradeoff as I'm doing in [1]. > > I guess I'd still like to treat both series separately for now given > that [1] is more involved compared to this patch series here. I'll then > do a follow-up when (if?) both series have landed. Heh, I should have read this before writing my other response. Your strategy here is what I imagined. If you split the find/fill steps from parse_commit_in_graph(), then you should be able to speculatively ask "if this is a commit in the graph, fill it in, otherwise do nothing". Which would solve the memory tradeoff. -Peff