joe_g Posted May 8 Share Posted May 8 Hey there, I've got a site with a weird performance issue. Requesting ~20 pages and displaying them with $image->width(400)->url can take up to 2-3 seconds. The resized images are already generated. If I replace that line with $image->url the request is almost instantaneous, as it should be. So it seems like the width() function is struggling for whatever reason. Could it be something with permissions on the files under /assets/files that is causing this? An example of the file with ls -lah looks like this: -rw-r--r-- 1 www-data www-data 510K May 8 10:32 20_10_xxx_web.800x0.png The original (is fast) looks like this -rwxrwx--- 1 joe www-data 1.3M Mar 16 16:36 20_10_xxx_web.png* I should probably restrict the permission a bit, but first I'm looking to understand this slow down. Link to comment Share on other sites More sharing options...
wbmnfktr Posted May 8 Share Posted May 8 Totally untested but how does this perform in your setup? $image->size(400,0)->url Link to comment Share on other sites More sharing options...
joe_g Posted May 9 Author Share Posted May 9 Thanks, That actually works, but I think it might be for the wrong reason. There can't actually be any slowdowns because of permissions, I suppose? It has to be something else. Not sure what exactly yet, but I'll see if i can find out. 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted May 9 Share Posted May 9 Awesome that it works. It was meant more for testing if all image functions take so much time. This way we know there is something weird happening with width() - yet I am not sure what it could be right now. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now