-
-
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
Getting thumbnail from S3 is still slow #252
Comments
First of all, features on #96 had been merged. On the problem, thanks for such a detailed description. Getting the source image, that is for what I see the slowest line source_image = default.engine.get_image(source) class Engine(EngineBase):
def get_image(self, source):
buffer = BufferIO(source.read())
return Image.open(buffer) So, I'm implying that talking to S3 is slowing down the process, the same is in the step to create the thumbnail. What can we do is optimizing that backend, Right now I'm not sure how. In other aspects, how do you connect to S3, your app is on AWS also? |
Yes, we have an EC2 instance running with our website, and our media and static is on an S3. |
I have the same issue. Here Sorl is creating new thumbnails each time the page loads. |
Ok, I seem to have gotten it working again. I downgraded sorl and boto. |
@sbaechler I encountered the same thing. Thanks for the tip I´ll try it! |
I cannot downgrade, because the old version does not work with Django 1.7. Yet I have severe performance issues, because it is accessing S3 all the time. What am I left to do? Will this be fixed? |
@webjunkie I think it's fixed in the current master. There are not tests yet, however. |
@sbaechler Yes, you are right. That works, thanks. My performance problem now seems to be somewhere else... |
@sbaechler @webjunkie does this mean that we can close this one? |
Sure. Please do a new beta release soon. |
I think we may be reaching the goal for version 12 pretty soon, so I hope the next release will be soon :) |
Does it work with latest boto or does it have to be a specific version ? (for pip install git+https://github.com/mariocesar/sorl-thumbnail.git@8174d97e6ffec1174361b6dd65a57d97e8931382 ) |
Sorry to refloat this, is S3 usable now? |
@cristianocca I have been using it since 2015 with S3 and no issues |
I'm running the latest version (34e1ffa) and I'm (still) trying to optimize pages with a lot of thumbnails. This time, I'm running into troubles with our Amazon S3 storage. Getting thumbnails stored on there can take over a second per thumbnail unless it's cached, which does not always to seem the case. I hoped the replacement of
exists()
mentioned in #92 would fix my issue, but alas, it's still taking a very long time. A page with about 15 thumbnails on it can take up to 10-15 seconds to load because of this. I hope you guys can give me any pointers.I've used the same line profiling decorator as I mentioned in #232 which clearly adds some loading time (over 2 seconds per thumbnail), but it shows a notable difference between a cached thumbnail and one which has to be retrieved from S3:
Example of a cached thumbnail:
Example of a thumbnail retrieved from S3:
The text was updated successfully, but these errors were encountered: