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

Always store the preview returned by Imagemagick before resizing it #12465

Closed
oparoz opened this issue Nov 27, 2014 · 3 comments
Closed

Always store the preview returned by Imagemagick before resizing it #12465

oparoz opened this issue Nov 27, 2014 · 3 comments

Comments

@oparoz
Copy link
Contributor

oparoz commented Nov 27, 2014

For performance reasons, a preview provider class can be modified to return an image of a maximum size which makes sense for a preview in a browser. Some people have talked of max 1024x1024 per example.

But in order to really improve performance, especially for the classes which use Imagemagick, it would be worth for the preview class to store that large image (usually PNG) in the cache before resizing it. That way, the next time a thumbnail is generated, GD can quickly resize that max size cached picture.

@PVince81
Copy link
Contributor

At some point I also thought about having gradual size increases. Instead of having images for ANY pixel sizes, we could have cached images for 32x32, 128x128, 256x256, 1024x1024, etc generated on-demand.

@karlitschek
Copy link
Contributor

@PVince81 we already only cache the thumbnails that are requested. Not every possible size.
So it's the decision of the app which size it requests. This makes sense IMHO

@oparoz oparoz changed the title [Performance] Always store the preview returned by Imagemagick before resizing it Always store the preview returned by Imagemagick before resizing it Dec 2, 2014
@oparoz
Copy link
Contributor Author

oparoz commented Jan 22, 2015

Introducing the maximum size preview. #13674

@DeepDiver1975 DeepDiver1975 added this to the 8.1-next milestone Jan 22, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants