yireo / Yireo_NextGenImages

44 stars 26 forks source link

Reduce I/O operation for high traffic server #15

Closed cmuench closed 2 years ago

cmuench commented 2 years ago

Use stat to check if a file is not empty instead of loading the complete content. If the file system does not support start we have a fallback call with "readAll".

jissereitsma commented 2 years ago

Many thanks. I actually found another "more elegant" (?) solution as well: https://github.com/yireo/Yireo_NextGenImages/blob/master/Image/File.php#L95 The latest release ships with this change.