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-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9FE791F9FF for ; Tue, 16 Mar 2021 08:48:07 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/2] git: drop async_prefetch method Date: Tue, 16 Mar 2021 03:48:07 -0500 Message-Id: <20210316084807.16758-3-e@80x24.org> In-Reply-To: <20210316084807.16758-1-e@80x24.org> References: <20210316084807.16758-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: That logic is inlined directly into git_async_prefetch in GitAsyncCat and I don't see it being useful outside of a DS event loop. --- lib/PublicInbox/Git.pm | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index e176921c..f680eb2f 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -467,20 +467,6 @@ sub cat_async ($$$;$) { push(@$inflight, $oid, $cb, $arg); } -sub async_prefetch { - my ($self, $oid, $cb, $arg) = @_; - if (my $inflight = $self->{inflight}) { - # we could use MAX_INFLIGHT here w/o the halving, - # but lets not allow one client to monopolize a git process - if (scalar(@$inflight) < int(MAX_INFLIGHT/2)) { - print { $self->{out} } $oid, "\n" or - $self->fail("write error: $!"); - return push(@$inflight, $oid, $cb, $arg); - } - } - undef; -} - sub extract_cmt_time { my ($bref, undef, undef, undef, $modified) = @_;