Actions
Feature proposal #6960
closedImplement smart file chunking
Description
Currently files are always output to the buffer in chunks. This basically allows serving unlimited size files without hitting PHP memory limits. However, chunking a file does increase its load time. File chunking isn't necessary on smaller files (e.g. anything less than 512kb should be fine) so it's resulting in images or smaller files being output to buffer SLIGHTLY slower (couple milliseconds). Implement smart buffering so it doesn't need to bother doing this for smaller files.
In addition to this fopen with fseek is always used even if there is no range request. If the file is smaller and no range then readfile can be used to just directly push to buffer a little faster.
Actions