diff options
author | Eric Wong <e@80x24.org> | 2021-06-24 05:50:04 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-06-24 12:59:40 +0000 |
commit | 9c42ece6dfddf4156dc3016e2fa8835bf3d8aca1 (patch) | |
tree | c47b1ae3c5e3817eb67337152f8d1e27e3238f2b /lib/PublicInbox/IMAP.pm | |
parent | 5ef37f4a13e2be711ef074dc2cd9994005273117 (diff) | |
download | public-inbox-9c42ece6dfddf4156dc3016e2fa8835bf3d8aca1.tar.gz |
While both git and libgit2 take around 16 minutes to load 100K alternates there's already a proposed patch to make git faster: <https://lore.kernel.org/git/20210624005806.12079-1-e@80x24.org/> It's also easier to patch and install git locally since the git.git build system defaults to prefix=$HOME and dealing with dynamic linking with libgit2 is more difficult for end users relying on Inline::C. libgit2 remains in use for the non-ALL.git case, but maybe it's not necessary (libgit2 is significantly slower than git in Debian 10 due to SHA-1 collision checking).
Diffstat (limited to 'lib/PublicInbox/IMAP.pm')
-rw-r--r-- | lib/PublicInbox/IMAP.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/PublicInbox/IMAP.pm b/lib/PublicInbox/IMAP.pm index af8ce72b..9402aa41 100644 --- a/lib/PublicInbox/IMAP.pm +++ b/lib/PublicInbox/IMAP.pm @@ -612,7 +612,7 @@ sub fetch_run_ops { $self->msg_more(")\r\n"); } -sub fetch_blob_cb { # called by git->cat_async via git_async_cat +sub fetch_blob_cb { # called by git->cat_async via ibx_async_cat my ($bref, $oid, $type, $size, $fetch_arg) = @_; my ($self, undef, $msgs, $range_info, $ops, $partial) = @$fetch_arg; my $ibx = $self->{ibx} or return $self->close; # client disconnected @@ -627,8 +627,8 @@ sub fetch_blob_cb { # called by git->cat_async via git_async_cat } my $pre; if (!$self->{wbuf} && (my $nxt = $msgs->[0])) { - $pre = git_async_prefetch($ibx->git, $nxt->{blob}, - \&fetch_blob_cb, $fetch_arg); + $pre = ibx_async_prefetch($ibx, $nxt->{blob}, + \&fetch_blob_cb, $fetch_arg); } fetch_run_ops($self, $smsg, $bref, $ops, $partial); $pre ? $self->zflush : requeue_once($self); @@ -760,7 +760,7 @@ sub fetch_blob { # long_response } } uo2m_extend($self, $msgs->[-1]->{num}); - git_async_cat($self->{ibx}->git, $msgs->[0]->{blob}, + ibx_async_cat($self->{ibx}, $msgs->[0]->{blob}, \&fetch_blob_cb, \@_); } @@ -1228,7 +1228,7 @@ sub long_step { } elsif ($more) { # $self->{wbuf}: $self->update_idle_time; - # control passed to git_async_cat if $more == \undef + # control passed to ibx_async_cat if $more == \undef requeue_once($self) if !ref($more); } else { # all done! delete $self->{long_cb}; |