about summary refs log tree commit homepage
path: root/lib/PublicInbox/Over.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-10 07:05:18 +0000
committerEric Wong <e@yhbt.net>2020-06-13 07:55:45 +0000
commitba5b07877f468a3d233a1bba95eabe35ba7336e1 (patch)
treef3ffd896ced48e3536d1f8ad75296a7a363f511b /lib/PublicInbox/Over.pm
parentd7499f74c9eed7cebb6a4e273f04c854c1674c06 (diff)
downloadpublic-inbox-ba5b07877f468a3d233a1bba95eabe35ba7336e1.tar.gz
The IMAP code already limits the range to UID_SLICE (50K),
so that's about 1.6MB of of IVs for an ephemeral allocation
that won't live beyond one iteration of the event loop.
Diffstat (limited to 'lib/PublicInbox/Over.pm')
-rw-r--r--lib/PublicInbox/Over.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Over.pm b/lib/PublicInbox/Over.pm
index e0f20ea6..e32104f0 100644
--- a/lib/PublicInbox/Over.pm
+++ b/lib/PublicInbox/Over.pm
@@ -216,7 +216,7 @@ SELECT num,ts,ds,ddd FROM over WHERE num = ? LIMIT 1
         load_from_row($smsg);
 }
 
-# IMAP search
+# IMAP search, this is limited by callers to UID_SLICE size (50K)
 sub uid_range {
         my ($self, $beg, $end, $sql) = @_;
         my $dbh = $self->connect;
@@ -225,7 +225,7 @@ sub uid_range {
         # This is read-only, anyways; but caller should verify it's
         # only sending \A[0-9]+\z for ds and ts column ranges
         $q .= $$sql if $sql;
-        $q .= ' ORDER BY num ASC LIMIT ' . DEFAULT_LIMIT;
+        $q .= ' ORDER BY num ASC';
         $dbh->selectcol_arrayref($q, undef, $beg, $end);
 }