-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Steps:
- start server
- post an image
- request original size image
- add
?thumbnail=Truequerystring
Expected behaviour:
The thumbnail is generated and returned to the caller "quickly". Exactly what "quickly" means in debatable but ideally less than 1 second or at least within 5 seconds.
Actual behaviour:
Running with the following setup:
- Core i7 desktop with SSD and 16GB memory
- running in uwsgi
- a 5mb JPG posted initially
It took 217 seconds to generate the default sized thumbnail and 221 seconds to generate a xsize=300 thumbnail.
The thumbnail creation process also seems to ruin the image. As an example, here is an image requested with ?xsize=400&thumbnail=False:

...and here's the same image request with ?xsize=400&thumbnail=True, we've just flipped the flag to ask for a thumbnail:

It's distorted the image. This is using the default for thumbnail creation in the config.
More details:
It seems that you don't need to include the thumbnail param to generate a smaller size image. You can just supply xsize and ysize and it responds quickly. Perhaps we don't need the thumbnail mode?