]> Sergey Matveev's repositories - public-inbox.git/commitdiff
smsg: remove ->bytes and ->lines methods
authorEric Wong <e@yhbt.net>
Mon, 1 Jun 2020 10:06:55 +0000 (10:06 +0000)
committerEric Wong <e@yhbt.net>
Wed, 3 Jun 2020 04:04:21 +0000 (04:04 +0000)
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

index 9e363a112c04c17c326286dd706edb7d97aa9652..a7ee2e409391d4729d800b45c31d20563ff29fe6 100644 (file)
@@ -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)};