From eeeae20893a2595631359e719eadac9686572734 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 10 Jun 2020 07:04:22 +0000 Subject: imap: use git-cat-file asynchronously This ought to improve overall performance with multiple clients. Single client performance suffers a tiny bit due to extra syscall overhead from epoll. This also makes the existing async interface easier-to-use, since calling cat_async_begin is no longer required. --- xt/cmp-msgstr.t | 1 - xt/cmp-msgview.t | 1 - xt/eml_check_limits.t | 1 - xt/git_async_cmp.t | 1 - xt/msgtime_cmp.t | 1 - xt/perf-msgview.t | 1 - 6 files changed, 6 deletions(-) (limited to 'xt') diff --git a/xt/cmp-msgstr.t b/xt/cmp-msgstr.t index 6bae0f66..0276f845 100644 --- a/xt/cmp-msgstr.t +++ b/xt/cmp-msgstr.t @@ -93,7 +93,6 @@ my $git_cb = sub { diag xqx([qw(git diff), "$tmpdir/mime", "$tmpdir/eml"]); } }; -$git->cat_async_begin; my $t = timeit(1, sub { while (<$fh>) { my ($oid, $type) = split / /; diff --git a/xt/cmp-msgview.t b/xt/cmp-msgview.t index 66fb467e..5bd7aa17 100644 --- a/xt/cmp-msgview.t +++ b/xt/cmp-msgview.t @@ -77,7 +77,6 @@ my $git_cb = sub { is_deeply($eml_cmp, $mime_cmp, "$inboxdir $oid match"); } }; -$git->cat_async_begin; my $t = timeit(1, sub { while (<$fh>) { my ($oid, $type) = split / /; diff --git a/xt/eml_check_limits.t b/xt/eml_check_limits.t index 39de0476..2d632799 100644 --- a/xt/eml_check_limits.t +++ b/xt/eml_check_limits.t @@ -55,7 +55,6 @@ my $cat_cb = sub { }; my $t = timeit(1, sub { - $git->cat_async_begin; my ($blob, $type); while (<$fh>) { ($blob, $type) = split / /; diff --git a/xt/git_async_cmp.t b/xt/git_async_cmp.t index 46d27b26..8f8d1cf4 100644 --- a/xt/git_async_cmp.t +++ b/xt/git_async_cmp.t @@ -25,7 +25,6 @@ my $async = timeit($nr, sub { $dig->add($$bref); }; my $cat = $git->popen(@cat); - $git->cat_async_begin; while (<$cat>) { my ($oid, undef, undef) = split(/ /); diff --git a/xt/msgtime_cmp.t b/xt/msgtime_cmp.t index 95d7c64b..0ce3c042 100644 --- a/xt/msgtime_cmp.t +++ b/xt/msgtime_cmp.t @@ -59,7 +59,6 @@ sub compare { } my $fh = $git->popen(@cat); -$git->cat_async_begin; while (<$fh>) { my ($oid, $type) = split / /; next if $type ne 'blob'; diff --git a/xt/perf-msgview.t b/xt/perf-msgview.t index 30fc07dc..d99101a3 100644 --- a/xt/perf-msgview.t +++ b/xt/perf-msgview.t @@ -44,7 +44,6 @@ my $cb = sub { $obuf = ''; }; -$git->cat_async_begin; my $t = timeit(1, sub { $ctx->{obuf} = \$obuf; $ctx->{mhref} = '../'; -- cgit v1.2.3-24-ge0c7