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-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE 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 920051F65E for ; Sat, 10 Sep 2022 08:18:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1662797935; bh=a2N6rLqA7OTbM6LV7A3+Ad6mC9S+hxz2HvxlMt7N5HA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HS56rsSNhPLkW/9IKMOYit5hWVbqknGvddx+2zeYUCCs5T5asPAuRRynCIuZaOTZq 7osWq1ZHJdNVnts0jtflKh2nVjngVSXAklGdIPfwxD4FVEb08rIxLj9W04580o1enl ZHr7FR70YaNdAgPP+D5I+6W70wJrwM6dSlgD028s= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 22/38] view: html_footer: remove obuf dependency Date: Sat, 10 Sep 2022 08:17:13 +0000 Message-Id: <20220910081729.2011934-23-e@80x24.org> In-Reply-To: <20220910081729.2011934-1-e@80x24.org> References: <20220910081729.2011934-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Another step towards giving us more options for speedups and memory reductions. --- lib/PublicInbox/View.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index b27523b2..40b4bf36 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -774,11 +774,12 @@ sub thread_skel ($$$) { $ctx->{parent_msg} = $parent; } -# appends to obuf +# writes to zbuf sub html_footer { my ($ctx, $hdr) = @_; my $upfx = '../'; my ($related, $skel); + my $foot = '
';
 	my $qry = delete $ctx->{-qry};
 	if ($qry && $ctx->{ibx}->isrch) {
 		my $q = ''; # search for either ancestor or descendent patches
@@ -836,15 +837,14 @@ EOF
 		} elsif ($u) { # unlikely
 			$parent = " parent";
 		}
-		${$ctx->{obuf}} .= "
$next $prev$parent ";
+		$foot .= "$next $prev$parent ";
 	} else { # unindexed inboxes w/o over
-		${$ctx->{obuf}} .= '
';
 		$skel = qq( latest);
 	}
-	${$ctx->{obuf}} .= qq(reply);
-	# $skel may be big for big threads, don't append it to obuf
+	$foot .= qq(reply);
+	# $skel may be big for big threads, don't append it to $foot
 	$skel .= '
' . ($related // ''); - $ctx->zmore($skel .= msg_reply($ctx, $hdr)); # flushes obuf + $ctx->zmore($foot, $skel .= msg_reply($ctx, $hdr)); # flushes obuf } sub ghost_parent {