New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
withFile memory usage #16701
Comments
That's not entirely true. The application could have buffered output somewhere else and the current buffering level would be inferred. In your scenario I'm assuming you have are starting an output buffer somewhere else or have automatic output buffering enabled? |
I think what he means is that this is essentially a no-op if no value is being provided explicitly, as If the buffer was meant to be completely flushed and disabled by default, then |
Fair enough, I don't think that is contributing to additional memory usage though. |
Description
Downloading large files causes RAM issues.
Indeed, the file is sent by consecutive "echo" in "emitBody" but if we are in a buffer level, the file is stored in RAM.
I think there is a bug in the call of "flush()", here is its call in the method "ResponseEmiter::emit()"
Looks like we want to flush the entire existing buffer before running "emitBody()"
But, the flush function is called with null param :
with a null "$maxBuffer Level", we don't go through the loop, so we might as well do nothing
CakePHP Version
4.4.4
PHP Version
No response
The text was updated successfully, but these errors were encountered: