about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm17
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index c151f221..8ac405f2 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -1063,25 +1063,10 @@ sub index_nav { # callback for WwwStream
 sub index_topics {
         my ($ctx) = @_;
         my ($off) = (($ctx->{qp}->{o} || '0') =~ /(\d+)/);
-        my $lim = 200;
-        my $opts = { offset => $off, limit => $lim };
 
         $ctx->{order} = [];
         my $srch = $ctx->{srch};
-
-        my $qs = '';
-        # this complicated bit cuts loading time by over 400ms on my system:
-        if ($off == 0) {
-                my ($min, $max) = $ctx->{-inbox}->mm->minmax;
-                my $n = $max - $lim;
-                $n = $min if $n < $min;
-                for (; $qs eq '' && $n >= $min; --$n) {
-                        my $smsg = $srch->lookup_article($n) or next;
-                        $qs = POSIX::strftime('d:%Y%m%d..', gmtime($smsg->ts));
-                }
-        }
-
-        my $sres = $srch->query($qs, $opts);
+        my $sres = $ctx->{-inbox}->recent({offset => $off, limit => 200 });
         $sres = $sres->{msgs};
         my $nr = scalar @$sres;
         if ($nr) {