From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 51AA21FA10 for ; Sun, 24 Oct 2021 00:20:46 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 4/7] http: use a larger buffer for ->getline responses Date: Sat, 23 Oct 2021 18:20:42 -0600 Message-Id: <20211024002045.17755-5-e@80x24.org> In-Reply-To: <20211024002045.17755-1-e@80x24.org> References: <20211024002045.17755-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 debugger. --- lib/PublicInbox/HTTP.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; $forward->getline; } if $forward;