From 9897accfd16fca172748eb79a981322299c669aa Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Tue, 6 Aug 2024 07:00:46 -0400 Subject: [PATCH] bigger buffer for better performance --- http2.d | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/http2.d b/http2.d index 8f70d7d..3ea20f0 100644 --- a/http2.d +++ b/http2.d @@ -1664,8 +1664,10 @@ class HttpRequest { return socket; } + // stuff used by advanceConnections SocketSet readSet; SocketSet writeSet; + private ubyte[] reusableBuffer; /+ Generic event loop registration: @@ -1731,7 +1733,9 @@ class HttpRequest { if(writeSet is null) writeSet = new SocketSet(); - ubyte[2048] buffer; + if(reusableBuffer is null) + reusableBuffer = new ubyte[](32 * 1024); + ubyte[] buffer = reusableBuffer; HttpRequest[16] removeFromPending; size_t removeFromPendingCount = 0;