From patchwork Thu Feb 14 04:31:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff King X-Patchwork-Id: 10811745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 820D113A4 for ; Thu, 14 Feb 2019 04:35:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 639F02DD33 for ; Thu, 14 Feb 2019 04:35:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54B0B2DD38; Thu, 14 Feb 2019 04:35:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F21462DD33 for ; Thu, 14 Feb 2019 04:34:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730952AbfBNEba (ORCPT ); Wed, 13 Feb 2019 23:31:30 -0500 Received: from cloud.peff.net ([104.130.231.41]:43610 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1727974AbfBNEba (ORCPT ); Wed, 13 Feb 2019 23:31:30 -0500 Received: (qmail 29974 invoked by uid 109); 14 Feb 2019 04:31:30 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with SMTP; Thu, 14 Feb 2019 04:31:30 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 6262 invoked by uid 111); 14 Feb 2019 04:31:40 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.94) with (ECDHE-RSA-AES256-GCM-SHA384 encrypted) SMTP; Wed, 13 Feb 2019 23:31:40 -0500 Authentication-Results: peff.net; auth=none Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Wed, 13 Feb 2019 23:31:28 -0500 Date: Wed, 13 Feb 2019 23:31:28 -0500 From: Jeff King To: git@vger.kernel.org Subject: [PATCH 0/3] some prune optimizations Message-ID: <20190214043127.GA19019@sigill.intra.peff.net> MIME-Version: 1.0 Content-Disposition: inline Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Here are two optimizations for git-prune that we've been running at GitHub for ages. No particular reason to share them now; they just finally floated to the top of my todo pile. Do note that I rebased and polished them (and the third one is brand new), so the concepts are proven, but it's possible I introduced a new bug. ;) [1/3]: prune: lazily perform reachability traversal [2/3]: prune: use bitmaps for reachability traversal [3/3]: prune: check SEEN flag for reachability builtin/prune.c | 44 +++++++++++++++++++++++++++++++------------ reachable.c | 42 +++++++++++++++++++++++++++++++++++++++++ t/perf/p5304-prune.sh | 35 ++++++++++++++++++++++++++++++++++ t/t5304-prune.sh | 12 ++++++++++++ 4 files changed, 121 insertions(+), 12 deletions(-) create mode 100755 t/perf/p5304-prune.sh -Peff