From b9534449ecce2c59bb4aebad6051f91c3116b187 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Tue, 3 Apr 2018 11:09:09 +0000 Subject: view: avoid offset during pagination OFFSET in SQLite gets painful to deal with. Instead, rely on timestamps (from Received:) for pagination. This also sets us up for more precise Date searching in case we want it. --- lib/PublicInbox/Inbox.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/Inbox.pm') diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index 142b5c89..0ea18b4c 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -318,8 +318,8 @@ sub msg_by_mid ($$;$) { } sub recent { - my ($self, $opts) = @_; - search($self)->query('', $opts); + my ($self, $opts, $after, $before) = @_; + search($self)->{over_ro}->recent($opts, $after, $before); } 1; -- cgit v1.2.3-24-ge0c7