-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
s3 slowdown, 63 queries for 7 thumbnails #451
Comments
@fabiocaccamo please try to use the latest version first: |
@mariocesar the issue persists also using the latest version. Now, loading just 1 image (so 1 thumbnail) I can see that this query is executed 6 times:
and this query is duplicated 3 times:
Thanks for the quick reply. |
Probably related to cache, clean your cache keys What cache backend are you using? |
Cleaning cache keys didn't solved the problem, I don't think that the number of queries depends by the cache backend. |
For me the slowdown using s3 is not the db queries but the file transfer time:
This all happens during template rendering time, and once per new thumbnail to generate which causes the responses to take a lot of time to the point of timing out. I don't have an easy solution, what I did is generate the thumbnails async after flie upload using celery so they're ready on the next request. All this cycle is WAY faster when running just on local filesystem, it manifests when using s3. The DB hits haven't been much of a slowdown for me. |
Frankly I don't know the cause of the slowdown, but I solved it switching to VersatileImageField. |
👍 |
As you suggested, I already set
THUMBNAIL_FORCE_OVERWRITE = True
The text was updated successfully, but these errors were encountered: