user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 2/2] git: drop async_prefetch method
  2021-03-16  8:48  6% [PATCH 0/2] some dead code elimination Eric Wong
@ 2021-03-16  8:48  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-03-16  8:48 UTC (permalink / raw)
  To: meta

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) = @_;
 

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/2] some dead code elimination
@ 2021-03-16  8:48  6% Eric Wong
  2021-03-16  8:48  7% ` [PATCH 2/2] git: drop async_prefetch method Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-03-16  8:48 UTC (permalink / raw)
  To: meta

Eric Wong (2):
  nntp: remove unused header_append method
  git: drop async_prefetch method

 lib/PublicInbox/Git.pm  | 14 --------------
 lib/PublicInbox/NNTP.pm |  9 ---------
 2 files changed, 23 deletions(-)

^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-03-16  8:48  6% [PATCH 0/2] some dead code elimination Eric Wong
2021-03-16  8:48  7% ` [PATCH 2/2] git: drop async_prefetch method Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).