about summary refs log tree commit homepage
path: root/Documentation
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-09-10 08:17:19 +0000
committerEric Wong <e@80x24.org>2022-09-10 19:50:48 +0000
commitab9c03ff4aa369b397dc1a8c8936153c8565fd05 (patch)
tree8bc61ae89d8f967ea948918d0478db291011d159 /Documentation
parentf32456e0d0f4a7756fcc17c83ccf5b682cb512d9 (diff)
downloadpublic-inbox-ab9c03ff4aa369b397dc1a8c8936153c8565fd05.tar.gz
Calling Compress::Raw::Zlib::deflate is fairly expensive.
Relying on the `.=' (concat) operator inside ->zadd operator is
faster, but the method dispatch overhead is noticeable compared
to the original code where we had bare `.=' littered throughout.

Fortunately, `print' and `say' with the PerlIO::scalar IO layer
appears to offer better performance without high method dispatch
overhead.  This doesn't allow us to save as much memory as I
originally hoped, but does allow us to rely less on concat
operators in other places and just pass a list of args to
`print' and `say' as a appropriate.

This does reduce scratchpad use, however, allowing for large
memory savings, and we still ->deflate every single $eml.
Diffstat (limited to 'Documentation')
-rwxr-xr-xDocumentation/mknews.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/mknews.perl b/Documentation/mknews.perl
index 1936cea7..68866f44 100755
--- a/Documentation/mknews.perl
+++ b/Documentation/mknews.perl
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# Copyright (C) 2019-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 # Generates NEWS, NEWS.atom, and NEWS.html files using release emails
 # this uses unstable internal APIs of public-inbox, and this script
@@ -46,6 +46,7 @@ if ($dst eq 'NEWS') {
                 ibx => $ibx,
                 -upfx => "$base_url/",
                 -hr => 1,
+                zfh => $out,
         };
         if ($dst eq 'NEWS.html') {
                 html_start($out, $ctx);