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,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 668291FBD5 for ; Mon, 1 Jun 2020 10:06:59 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 11/13] smsg: remove ->bytes and ->lines methods Date: Mon, 1 Jun 2020 10:06:55 +0000 Message-Id: <20200601100657.14700-12-e@yhbt.net> In-Reply-To: <20200601100657.14700-1-e@yhbt.net> References: <20200601100657.14700-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: They're stored directly in Xapian and SQLite document data. NNTP accesses those fields directly to avoid method invocation overhead so there's no reason to waste several kilobytes for each sub. --- lib/PublicInbox/Smsg.pm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/PublicInbox/Smsg.pm b/lib/PublicInbox/Smsg.pm index 9e363a112c0..a7ee2e40939 100644 --- a/lib/PublicInbox/Smsg.pm +++ b/lib/PublicInbox/Smsg.pm @@ -90,10 +90,6 @@ sub from_mitem { psgi_cull(load_expand($self, $mitem->get_document)); } -# :bytes and :lines metadata in RFC 3977 -sub bytes ($) { $_[0]->{bytes} } -sub lines ($) { $_[0]->{lines} } - sub __hdr ($$) { my ($self, $field) = @_; $self->{lc($field)};