From ccf0f4040f573d83dce1d23bf3b058e8eefa580d Mon Sep 17 00:00:00 2001 From: Barfooss Date: Thu, 29 Dec 2022 01:27:16 +0100 Subject: [PATCH] Added stream_set_chunk_size to the underlying stream in the parse()-function --- src/Parser.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Parser.php b/src/Parser.php index 5623a82..82e618e 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -146,6 +146,8 @@ public function parse(): void while (!feof($this->stream) && !$eof) { $pos = ftell($this->stream); + // set the underlying streams chunk size, so it delivers according to the request from stream_get_line + stream_set_chunk_size($this->stream, $this->bufferSize); $line = stream_get_line($this->stream, $this->bufferSize, $this->lineEnding); if (false === $line) {