diff options
author | Eric Wong <e@80x24.org> | 2022-08-29 09:26:38 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-08-29 19:05:49 +0000 |
commit | be55542acc90572da54d828313c2416ae1c902b1 (patch) | |
tree | 001d9a6f38a16a023bd6f6b7a32a30403442a1ca /t/v1-add-remove-add.t | |
parent | a66a2eddda8ffbb7679f4ef80dba7c7d377cda84 (diff) | |
download | public-inbox-be55542acc90572da54d828313c2416ae1c902b1.tar.gz |
treewide: ditch inbox->recent method
It's a needless wrapper, nowadays. Originally, ->over was added on experimental basis to optimize for /$INBOX/ where Xapian ->search is slower on gigantic (LKML-sized) inboxes. Nowadays with extindex, ->over is here to stay given NNTP and IMAP both benefit from it. So reduce the interpreter stack overhead and just access ->over directly. lxs->recent was never used outside of tests, anyways. And while we're in the area, avoid needlessly bumping the refcount of $ctx->{ibx} in View::paginate_recent.
Diffstat (limited to 't/v1-add-remove-add.t')
-rw-r--r-- | t/v1-add-remove-add.t | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/v1-add-remove-add.t b/t/v1-add-remove-add.t index a94bf7fd..ae045dfa 100644 --- a/t/v1-add-remove-add.t +++ b/t/v1-add-remove-add.t @@ -32,7 +32,7 @@ ok($im->add($mime), 'message added again'); $im->done; my $rw = PublicInbox::SearchIdx->new($ibx, 1); $rw->index_sync; -my $msgs = $ibx->recent({limit => 10}); +my $msgs = $ibx->over->recent({limit => 10}); is($msgs->[0]->{mid}, 'a-mid@b', 'message exists in history'); is(scalar @$msgs, 1, 'only one message in history'); is($ibx->mm->num_for('a-mid@b'), 2, 'exists with second article number'); |