-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
Avoid is_readable check when possible #7095
Comments
4 tasks
@bastianallgeier used the code from your PR in my 20k pages test setup and got 3-4% total performance boost and like i measured before 30-40% inside the F::read itself. |
btw the |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The
is_readable
function seems innocent but since it checks the file on the disk it has a noticable impact on performance when execute thousands of times. My suggestion would be to delay it and just try and fail. This will improve the read function speed about 30-40% based on my tests – which is huge imho.current
proposed
kirby/src/Filesystem/F.php
Line 612 in a0e64e8
The text was updated successfully, but these errors were encountered: