about summary refs log tree commit homepage
path: root/lib/PublicInbox/WwwListing.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-09-10 08:16:59 +0000
committerEric Wong <e@80x24.org>2022-09-10 19:50:30 +0000
commit4fef904295e07dc9d0a144a4e6fc5bfb59c80fb9 (patch)
treeed7459bca90c940c30b8abb7e2ac23d3a4fa9884 /lib/PublicInbox/WwwListing.pm
parent0ff8c4f7e0815a0aa2e9935dd07ae446ce83c906 (diff)
downloadpublic-inbox-4fef904295e07dc9d0a144a4e6fc5bfb59c80fb9.tar.gz
www_listing: consolidate some ->zmore dispatches
`.' concatenation is still faster for small strings, but
passing an array to ->zmore is more efficient for large
search results and full listings.
Diffstat (limited to 'lib/PublicInbox/WwwListing.pm')
-rw-r--r--lib/PublicInbox/WwwListing.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm
index 79c0a8ec..0ab41452 100644
--- a/lib/PublicInbox/WwwListing.pm
+++ b/lib/PublicInbox/WwwListing.pm
@@ -223,13 +223,12 @@ sub psgi_triple {
                         @$list = map { $_->[1] }
                                 sort { $b->[0] <=> $a->[0] } @$list;
                 }
-                $gzf->zmore('<pre>');
-                $gzf->zmore(join("\n", @$list));
+                $gzf->zmore('<pre>', join("\n", @$list)); # big
                 $gzf->zmore(mset_footer($ctx, $mset)) if $mset;
         } elsif (my $mset = delete $ctx->{-mset}) {
-                $gzf->zmore(mset_nav_top($ctx, $mset));
-                $gzf->zmore('<pre>no matching inboxes');
-                $gzf->zmore(mset_footer($ctx, $mset));
+                $gzf->zmore(mset_nav_top($ctx, $mset) .
+                                '<pre>no matching inboxes' .
+                                mset_footer($ctx, $mset));
         } else {
                 $gzf->zmore('<pre>no inboxes, yet');
         }