Skip to content

ext/standard/file: disable the read buffer in file_get_contents() #8547

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

Closed

Conversation

MaxKellermann
Copy link
Contributor

The read buffer is useless here, it only hurts performance.

(This used to be part of #8032)

@bwoebi
Copy link
Member

bwoebi commented May 13, 2022

This makes a lot of sense to me. (Btw. code style nit: IIRC we always use {} for ifs, at the very least when a new line is used.)

The read buffer is useless here, it only hurts performance.
@MaxKellermann MaxKellermann force-pushed the file_get_contents-unbuffered branch from 82651e6 to 809a639 Compare May 13, 2022 13:11
@MaxKellermann
Copy link
Contributor Author

we always use {} for ifs, at the very least when a new line is used.

Fixed.

Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a nice improvement. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants