my $inboxdir = $ENV{GIANT_INBOX_DIR} // $ENV{GIANT_PI_DIR};
plan skip_all => "GIANT_INBOX_DIR not defined for $0" unless $inboxdir;
my $inboxdir = $ENV{GIANT_INBOX_DIR} // $ENV{GIANT_PI_DIR};
plan skip_all => "GIANT_INBOX_DIR not defined for $0" unless $inboxdir;
my ($str, $mime, $res, $cmt, $type);
my $n = 0;
my $t = timeit(1, sub {
my ($str, $mime, $res, $cmt, $type);
my $n = 0;
my $t = timeit(1, sub {
while (<$fh>) {
($cmt, $type) = split / /;
next if $type ne 'blob';
++$n;
$str = $git->cat_file($cmt);
$mime = PublicInbox::MIME->new($str);
while (<$fh>) {
($cmt, $type) = split / /;
next if $type ne 'blob';
++$n;
$str = $git->cat_file($cmt);
$mime = PublicInbox::MIME->new($str);
- $res = PublicInbox::View::msg_html($ctx, $mime);
- $res = $res->[2];
- while (defined($res->getline)) {}
- $res->close;
+ PublicInbox::View::multipart_text_as_html($mime, '../', $ctx);
+ $obuf = '';