-
Notifications
You must be signed in to change notification settings - Fork 378
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
Perfomance Issues #225
Comments
That's why there is a resolver wrapping another one caching its results: see #184 |
Thanks, sometimes one should just read more carefully, I always skipped the CacheResolver, because I thought it would be replaced by the S3 resolver. Can you make a recommendation regarding the cache to use? In my environment I have APC, Memcached and redis in beta. For now I only use APC, because its just an PHP extension, but if the performance gain is sufficient, I could easily upgrade or switch to memcached. |
We are using memcached via https://www.memcachier.com/. |
Thanks for the valuable tips, this solved major performance issues on my site. Nevertheless I am encountering a weird behaviour, two pictures were newly added and not the final S3 URL but the URL to the media/cache controller was cached. So all pictures were loading fine except the two new ones. The only solution I found was to delete the cache entries manually. How do I prevent this from happening? |
Ok, I setup the CacheResolver wraper, but we still get a huge slowdown (about 30 seconds). Basically, there is no difference in using the wrapper or s3 directly. This happens on serializing entities:
Cache settings:
Imagine settings:
|
@plamenh Did you resolve performance issues with S3? |
@apichlinski we definitely solved that, but now I don't remember how exactly. When I compare what we have right now with what I wrote a year ago, I see we are using the cacheManager differently:
instead of
See, if this helps. |
Hi,
I am having several sites where I show a lot of user profile picture thumbs. Those sites are extremely slow. I think it is related to the imagine filter. I have created a performance test, that collects the exact same data as my controller and then accesses the exact same variables / functions as my view.
All those calculations take about 8ms, but as soon as I add the following line it takes already 2 seconds ( for 2 users, exponentially growing with number of users, because its in a loop):
Why is that so slow? My backend is Gaufrette with AmazonS3. I thought there would be a CacheManager in between, that might cache the paths or something. Or the path itself can easily calculated from $user->getProfilePic(), because the original file is in my bucket under profile/$profilePicName and the filtered file would be under profile_thumb_small/$profilePicName. But to "calculate" this, it still takes about a second.
Also in prod the request goes through my webserver instead of just resolving the link:
The text was updated successfully, but these errors were encountered: