From f32456e0d0f4a7756fcc17c83ccf5b682cb512d9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 10 Sep 2022 08:17:18 +0000 Subject: www: switch to zadd for the majority of buffering This allows us to focus string concatenations in one place to allow Perl internal scratchpad optimizations to reuse memory. Calling Compress::Raw::Zlib::deflate repeatedly proves too expensive in terms of CPU cycles. --- lib/PublicInbox/SearchView.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/SearchView.pm') diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index e0404e5f..b18947ee 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -331,7 +331,7 @@ sub mset_thread { # callback for PublicInbox::WwwStream::getline sub mset_thread_i { my ($ctx, $eml) = @_; - $ctx->zmore($ctx->html_top) if exists $ctx->{-html_tip}; + $ctx->zadd($ctx->html_top) if exists $ctx->{-html_tip}; $eml and return PublicInbox::View::eml_entry($ctx, $eml); my $smsg = shift @{$ctx->{msgs}} or $ctx->zmore(${delete($ctx->{skel})}); -- cgit v1.2.3-24-ge0c7