about summary refs log tree commit homepage
path: root/t/imapd.t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-10 07:05:11 +0000
committerEric Wong <e@yhbt.net>2020-06-13 07:55:45 +0000
commit56e4554469fb86c2cac63d9eabaffa64c531e835 (patch)
tree9e938f2167f3e1a1d533447b759cce6c95b3e7b4 /t/imapd.t
parent4aa27d61cbf10fdad098b20ae4bcef8f4893e531 (diff)
downloadpublic-inbox-56e4554469fb86c2cac63d9eabaffa64c531e835.tar.gz
This appears to significantly improve header caching behavior
with mutt.  With the current public-inbox.org/git mirror(*),
mutt will only re-FETCH the last ~300 or so messages in the
final "inbox.comp.version-control.git.7" mailbox, instead of
~49,000 messages every time.

It's not perfect, but a 500ms query is better than a >10s query
and mutt itself spends as much time loading its header cache.

(*) there are many gaps in NNTP article numbers (UIDs) due to
    spam removal from public-inbox-learn.
Diffstat (limited to 't/imapd.t')
-rw-r--r--t/imapd.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/imapd.t b/t/imapd.t
index c691e1a9..fdab074a 100644
--- a/t/imapd.t
+++ b/t/imapd.t
@@ -349,8 +349,8 @@ is(scalar keys %$ret, 3, 'got all 3 messages');
 }
 my $r2 = $mic->fetch_hash('1:*', 'BODY.PEEK[]') or BAIL_OUT "FETCH $@";
 is(scalar keys %$r2, 2, 'did not get all 3 messages');
-is($r2->{2}->{'BODY[]'}, $ret->{2}->{RFC822}, 'message 2 unchanged');
-is($r2->{3}->{'BODY[]'}, $ret->{3}->{RFC822}, 'message 3 unchanged');
+is($r2->{1}->{'BODY[]'}, $ret->{2}->{RFC822}, 'message 2 unchanged');
+is($r2->{2}->{'BODY[]'}, $ret->{3}->{RFC822}, 'message 3 unchanged');
 $r2 = $mic->fetch_hash(2, 'BODY.PEEK[HEADER.FIELDS (message-id)]')
                         or BAIL_OUT "FETCH $@";
 is($r2->{2}->{'BODY[HEADER.FIELDS (MESSAGE-ID)]'},