X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FInbox.pm;h=706089caac1b5788edb386c7dbf3a17d7f9b9f80;hb=f86a714ac141e257b9bd50be81065e670cfb718b;hp=43cf15baaa0c2beddb0fe3108b61fd74a7c8af0b;hpb=d012bfbedf10b925433d1b7bd823370347371e33;p=public-inbox.git diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index 43cf15ba..706089ca 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -273,7 +273,7 @@ sub msg_by_smsg ($$;$) { my ($self, $smsg, $ref) = @_; # ghosts may have undef smsg (from SearchThread.node) or - # no {blob} field (from each_smsg_by_mid) + # no {blob} field return unless defined $smsg; defined(my $blob = $smsg->{blob}) or return; @@ -290,11 +290,6 @@ sub smsg_mime { } } -sub path_check { - my ($self, $path) = @_; - git($self)->check('HEAD:'.$path); -} - sub mid2num($$) { my ($self, $mid) = @_; my $mm = mm($self) or return; @@ -318,21 +313,8 @@ sub msg_by_mid ($$;$) { } sub recent { - my ($self, $opts) = @_; - my $qs = ''; - my $srch = search($self); - if (!$opts->{offset}) { - # this complicated bit cuts /$INBOX/ loading time by - # over 400ms on my system: - my ($min, $max) = mm($self)->minmax; - my $n = $max - $opts->{limit}; - $n = $min if $n < $min; - for (; $qs eq '' && $n >= $min; --$n) { - my $smsg = $srch->lookup_article($n) or next; - $qs = strftime('d:%Y%m%d..', gmtime($smsg->ts)); - } - } - $srch->query($qs, $opts); + my ($self, $opts, $after, $before) = @_; + search($self)->{over_ro}->recent($opts, $after, $before); } 1;