From d012bfbedf10b925433d1b7bd823370347371e33 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Fri, 30 Mar 2018 01:20:48 +0000 Subject: feed: optimize query for feeds, too This is a smaller improvement than the landing /$INBOX/ page because full message bodies are shown; but still saves around 100ms for my system with LKML. --- lib/PublicInbox/Feed.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/Feed.pm') diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index f2285a68..2f59f8c2 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -114,7 +114,7 @@ sub recent_msgs { my $o = $qp ? $qp->{o} : 0; $o += 0; $o = 0 if $o < 0; - my $res = $srch->query('', { limit => $max, offset => $o }); + my $res = $ibx->recent({ limit => $max, offset => $o }); my $next = $o + $max; $ctx->{next_page} = "o=$next" if $res->{total} >= $next; return $res->{msgs}; -- cgit v1.2.3-24-ge0c7