-
Notifications
You must be signed in to change notification settings - Fork 379
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
Liip + KnpGaufrette + Google Cloud Service : slow performances #1288
Comments
Hi, could you share your config? |
The problem here is when you want to return a url or a resolve url to your frontend the bundle checks first if the image in the given filter configuration is already created, if not the filter generates one cached image. The problem here that you have to ask every time the google api if there is a cached images and the response times from google api are "slow". So if you have to render several images, eg. product list, the server time gets even longer, in our case we had to render about 52 images and every api call needed about 30ms for each images, so we "waited" 1.5 seconds for asking google if there is a cached image :) We "solved" it by using a redis cache which stores all the generated images for us, so we don't have to ask google first. |
The problem can be solved by warming up the cache and always using a link to the cache in the templates without hecking for availability #1348 |
Thanks guys. |
Hello.
I'm successfully using Google Cloud Service with Liip and Kip Gaufrette.
Doing a
{{image.jpg|imagine_filter( 'my_filter' )}}
generates the filtered image on a cache folder on the GCS bucket. Works fine.The problem I'm facing, is that even when the filtered images exists on the cache folder on the GCS bucket, it takes a long time for the image to be displayed. I kind of understand why, back and force between my server and GCS ( checking if object exists, then returning the objet from who i can build the object Url.
If I'm calling the URL directly, it's fast and furious.
Maybe I'm missing something, am I suppose to add a layer on top of that config ?
And storing the urls in a cache locally ?
I think I'm missing something here :)
Thanks.
The text was updated successfully, but these errors were encountered: