about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-09-10 08:17:13 +0000
committerEric Wong <e@80x24.org>2022-09-10 19:50:42 +0000
commit83f305a2f87b0bf82ba8b58493a8f8c0b063bb54 (patch)
treeffad9e56ff1ef19b5db41086c6435774bc7a3288 /lib/PublicInbox/View.pm
parentc28e2f8b175cefeafba7c4e9fbb65e5b6021dded (diff)
downloadpublic-inbox-83f305a2f87b0bf82ba8b58493a8f8c0b063bb54.tar.gz
Another step towards giving us more options for speedups and
memory reductions.
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm12
1 files 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 = '<pre>';
         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 = " <a\nhref=\"$u\"\nrel=prev>parent</a>";
                 }
-                ${$ctx->{obuf}} .= "<pre>$next $prev$parent ";
+                $foot .= "$next $prev$parent ";
         } else { # unindexed inboxes w/o over
-                ${$ctx->{obuf}} .= '<pre>';
                 $skel = qq( <a\nhref="$upfx">latest</a>);
         }
-        ${$ctx->{obuf}} .= qq(<a\nhref="#R">reply</a>);
-        # $skel may be big for big threads, don't append it to obuf
+        $foot .= qq(<a\nhref="#R">reply</a>);
+        # $skel may be big for big threads, don't append it to $foot
         $skel .= '</pre>' . ($related // '');
-        $ctx->zmore($skel .= msg_reply($ctx, $hdr)); # flushes obuf
+        $ctx->zmore($foot, $skel .= msg_reply($ctx, $hdr)); # flushes obuf
 }
 
 sub ghost_parent {