lib/PublicInbox/MsgIter.pm | 5 +++++ diff --git a/lib/PublicInbox/MsgIter.pm b/lib/PublicInbox/MsgIter.pm index d9df32abc37c7fc7da68c0e09ed2f942ddbb4827..6453d9f1043630d267d19c8c1445ef8a288f3abe 100644 --- a/lib/PublicInbox/MsgIter.pm +++ b/lib/PublicInbox/MsgIter.pm @@ -38,6 +38,11 @@ sub msg_part_text ($$) { my ($part, $ct) = @_; + # TODO: we may offer a separate sub for people who need to index + # HTML-only mail, but the majority of HTML mail is multipart/alternative + # with a text part which we don't have to waste cycles decoding + return if $ct =~ m!\btext/x?html\b!; + my $s = eval { $part->body_str }; my $err = $@;