]> Sergey Matveev's repositories - public-inbox.git/commitdiff
search: avoid mindlessly calling body_set
authorEric Wong <e@80x24.org>
Fri, 9 Sep 2016 00:01:29 +0000 (00:01 +0000)
committerEric Wong <e@80x24.org>
Fri, 9 Sep 2016 00:02:25 +0000 (00:02 +0000)
It's not worth entering a complex codepath in Email::MIME to
save some (probably immeasurable amount of) memory, here.  We've
already stopped doing this in our WWW code a while back, too.
If we really cared enough about it, we'd prioritize work on a
streaming replacement for Email::MIME.

lib/PublicInbox/SearchIdx.pm

index 86be9ed49811722bd64f667e002a41c18bdf300b..0e2d225e52e945ecab134aeff3fc5af462b2822f 100644 (file)
@@ -188,7 +188,6 @@ sub add_message {
 
                        my (@orig, @quot);
                        my $body = $part->body;
-                       $part->body_set('');
                        my @lines = split(/\n/, $body);
                        while (defined(my $l = shift @lines)) {
                                if ($l =~ /^>/) {