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/WwwAtomStream.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/WwwAtomStream.pm') diff --git a/lib/PublicInbox/WwwAtomStream.pm b/lib/PublicInbox/WwwAtomStream.pm index cdfbf393..1c7ae881 100644 --- a/lib/PublicInbox/WwwAtomStream.pm +++ b/lib/PublicInbox/WwwAtomStream.pm @@ -146,7 +146,7 @@ sub feed_entry { my $name = ascii_html(join(', ', PublicInbox::Address::names($from))); $email = ascii_html($email // $ctx->{ibx}->{-primary_address}); - $ctx->zmore( + $ctx->zadd( (delete($ctx->{emit_header}) ? atom_header($ctx, $title) : ''). "$name$email" . "$title$updated" . -- cgit v1.2.3-24-ge0c7