From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 878F31FBC8 for ; Wed, 10 Jun 2020 07:08:34 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 81/82] over: uid_range: remove LIMIT Date: Wed, 10 Jun 2020 07:05:18 +0000 Message-Id: <20200610070519.18252-82-e@yhbt.net> In-Reply-To: <20200610070519.18252-1-e@yhbt.net> References: <20200610070519.18252-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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. --- lib/PublicInbox/Over.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/Over.pm b/lib/PublicInbox/Over.pm index e0f20ea6d3d..e32104f0cf8 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); }