about summary refs log tree commit homepage
path: root/lib/PublicInbox/HTTP.pm
diff options
authorEric Wong <e@80x24.org>2021-10-23 18:20:42 -0600
committerEric Wong <e@80x24.org>2021-10-24 02:20:33 +0000
commitc410bf707fb77b15698e14119dbf6e14e43479ba (patch)
tree28bd3ffa514599c0596ca946c920899bb604a9ea /lib/PublicInbox/HTTP.pm
parentdf7a89286e18836670af8270748a9ea00e4961f6 (diff)
http: use a larger buffer for ->getline responses
64K matches the Linux pipe default, and matches what we use in
httpd/async and qspawn.  This should reduce syscalls used for
serving git packs via dumb HTTP and any ->getline code paths
used by other PSGI code.

This appears to speed up HTML rendering by w3m when serving
giant HTML responsees from the Devel::Mwrap::PSGI memory
Diffstat (limited to 'lib/PublicInbox/HTTP.pm')
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm
index 18a19250..e65988be 100644
--- a/lib/PublicInbox/HTTP.pm
+++ b/lib/PublicInbox/HTTP.pm
@@ -235,7 +235,7 @@ sub getline_pull {
         # limit our own running time for fairness with other
         # clients and to avoid buffering too much:
         my $buf = eval {
-                local $/ = \8192;
+                local $/ = \65536;
         } if $forward;