Skip to content
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

thumbnail.exists() is too slow when using S3 as a backend storage #92

Closed
wants to merge 1 commit into from

Conversation

leotsem
Copy link
Contributor

@leotsem leotsem commented Mar 13, 2012

clearly, it's more a django-storages issue than a sorl issue, but in my case, when using S3 as a backend, it took about 60 secons to run thumbnail.exists() so I've removed the check and made the assumption that if the thumbnail does not exist in the cache it does not exist on the disk either. Now it runs under 1 second.

@tomwys
Copy link

tomwys commented Mar 25, 2012

I use sorl.thumbnail with S3 (django-storages + s3boto; EC2; Europe) and it works fine (I heven't spotted any delays). Are you sure that this is S3 fault? Maybe it's problem with your server or connection? Do you use EC2 or different server? Do you have S3 and EC2 in same region? How is it possible that checking if thumbnail exists takes 60s, but creating new one and storing to S3 takes under 1s?

@sorl
Copy link
Collaborator

sorl commented Apr 24, 2012

"exists() is extremely slow when using S3boto as a backend, so I've make the assumption that if the thumbnail is not cached, it doesn't exist" I am not going to merge that, better use a custom backend if you like - or add option not to check or something.

@sorl sorl closed this Apr 24, 2012
@mlewis
Copy link

mlewis commented Feb 6, 2013

If anyone comes across this looking for why easy-thumbnails is so slow with s3boto, it is the same problem. Search for "storage.exists." I had a terrible time trying to find the issue and this was the only page that led me to the answer.

@mariocesar
Copy link
Collaborator

There is a possible solution been discuss in #351, to recap this issue is not about sorl-thumbnail itself is about slow storage backends implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants