Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Is it normal to take more than 15-20 second to generate the image? (only on breakpoints > than 1100) #83

Closed
UberGruber opened this Issue · 4 comments

2 participants

@UberGruber

The title says it all.

Generating images for breakpoints of 1600 or 1920 width can take up to 20secs (sometimes even 30!). When is set to 1100px maximum, the script generates images in an expectable time (less than couple second, more or less).

I had also to inject in the php script ini_set('memory_limit', '128M'); to make the script go for anything more than the 1100px breakpoint, my base 48M was not enough.

Am i doing something really wrong? Unfortunately i'm providing a full screen image gallery, with support for retina display too, su images can be pretty big..

I'm on a shared webhost and maybe the server ain't that good, but this kinda surprise me to be so heavy to run.

The images i'm passing via the script are for a photo gallery of a portfolio, so the ai-cache time (not the browser so to speak) can be set to a very high value, like a year, how can i do that?

Thank you for any answer, and my compliments for this amazing script, great job! :)

PS.
Raising the memory_limit to a higher value can help?
I'm a novice in these things and afaik php takes only enough memory to run what it needs right? so even with 1000M if it needs 50M it will take 50M only and take his time to make the script, correct?

@MattWilcox
Owner

Depends entirely on your server's settings and overall capacity. If you're on a shared server which is over capacity with low amounts of RAM or a slow processor then yes it can take a while. In the same way that if you had one computer that's simultaneously running 40 different applications would be slow if you then decided to open Photoshop and rescale a large image.

Altering server settings to use more RAM may well help you, but only to a point - it's likely that there's a hard-limit on your shared server that you can't go beyond anyway; otherwise any one of the users on the server could steal all of the RAM.

@MattWilcox MattWilcox closed this
@MattWilcox
Owner

PS: Setting the AI cache time is done in the settings at the top of the AI.php file; just open it up and have a read of the comments at the top :)

@UberGruber

Ah i see! And for the record, it was more an issue with multiple requests for large script generated images from a lightbox plugin i use; the lightbox gallery loads the target image along with the previous and next one at the same time, couple tests showed me that the script can generate a sinlge large image on my server in a more than acceptable time span (less than 5s).
As for the cache, basically it keeps the cache as long as i don't change the source image file isn't it? The top cache settings are for the browser cache only right?

Thank you for your answers! :)

@MattWilcox
Owner

Ahh yeah, those first generations of images are gonna be slow if you've got a few going on at once :) As you say though, once they're done that's it unless you change the source file - and yep, the other settings are for the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.