* [PATCH 12/15] git_async_cat: use git from "all" extindex if possible
2023-11-30 11:40 4% [PATCH 00/15] various cindex fixes + speedups Eric Wong
@ 2023-11-30 11:41 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2023-11-30 11:41 UTC (permalink / raw)
To: meta
For inboxes associated with an extindex (currently only the
special "all") one, we can share the git process across
all those inboxes unambiguously when retrieving full SHA-1
blobs.
The comment for my proposed patch is also out-of-date as that
git speedup has been a part of git since 2.33.
---
lib/PublicInbox/GitAsyncCat.pm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/PublicInbox/GitAsyncCat.pm b/lib/PublicInbox/GitAsyncCat.pm
index 09744b34..f57e0336 100644
--- a/lib/PublicInbox/GitAsyncCat.pm
+++ b/lib/PublicInbox/GitAsyncCat.pm
@@ -9,11 +9,11 @@ our $GCF2C; # singleton PublicInbox::Gcf2Client
sub ibx_async_cat ($$$$) {
my ($ibx, $oid, $cb, $arg) = @_;
- my $git = $ibx->{git} // $ibx->git;
+ my $isrch = $ibx->{isrch};
+ my $git = $isrch ? $isrch->{es}->git : ($ibx->{git} // $ibx->git);
# {topdir} means ExtSearch (likely [extindex "all"]) with potentially
- # 100K alternates. git(1) has a proposed patch for 100K alternates:
- # <https://lore.kernel.org/git/20210624005806.12079-1-e@80x24.org/>
- if (!defined($ibx->{topdir}) && !defined($git->{-tmp}) &&
+ # 100K alternates. git v2.33+ can handle 100k alternates fairly well.
+ if (!$isrch && !defined($ibx->{topdir}) && !defined($git->{-tmp}) &&
($GCF2C //= eval {
require PublicInbox::Gcf2Client;
PublicInbox::Gcf2Client::new();
^ permalink raw reply related [relevance 7%]
* [PATCH 00/15] various cindex fixes + speedups
@ 2023-11-30 11:40 4% Eric Wong
2023-11-30 11:41 7% ` [PATCH 12/15] git_async_cat: use git from "all" extindex if possible Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-11-30 11:40 UTC (permalink / raw)
To: meta
Notable changes:
10/15 provides a huge speedup which will hopefully make
future developments faster.
12/15 probably obsoletes libgit2 for extindex "all" users.
13/15 can save some memory with many inboxes while making
configuration easier.
Eric Wong (15):
cindex: fix store_repo+repo_stored on no-op
codesearch: allow inbox count to exceed matches
config: reject newlines consistently in dir names
cindex: only create {-cidx_err} field on failures
cindex: keep batch pipe for pruning SHA-256 repos
cindex: store extensions.objectFormat with repo data
git: share unlinked pack checking code with gcf2
cindex: skip getpid guard for most OnDestroy use
spawn: drop IO layer support from redirects
cindex: speed up initial scan setup phase
inbox: expire resources more aggressively
git_async_cat: use git from "all" extindex if possible
www_listing: support publicInbox.nameIsUrl
inbox: shrink data structures for publicinbox.*.hide
codesearch: use retry_reopen for WWW
Documentation/public-inbox-config.pod | 19 +-
lib/PublicInbox/CodeSearch.pm | 54 +++--
lib/PublicInbox/CodeSearchIdx.pm | 286 ++++++++++++++++----------
lib/PublicInbox/Config.pm | 32 ++-
lib/PublicInbox/Gcf2.pm | 16 +-
lib/PublicInbox/Git.pm | 27 +--
lib/PublicInbox/GitAsyncCat.pm | 8 +-
lib/PublicInbox/Inbox.pm | 32 +--
lib/PublicInbox/MailDiff.pm | 3 +-
lib/PublicInbox/SearchIdx.pm | 5 +-
lib/PublicInbox/Spawn.pm | 32 +--
lib/PublicInbox/WwwListing.pm | 21 +-
12 files changed, 303 insertions(+), 232 deletions(-)
^ permalink raw reply [relevance 4%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-11-30 11:40 4% [PATCH 00/15] various cindex fixes + speedups Eric Wong
2023-11-30 11:41 7% ` [PATCH 12/15] git_async_cat: use git from "all" extindex if possible 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).