Skip to content

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

Closed

Description

@oparoz

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.

Activity

  1. PVince81 commented on Nov 27, 2014

    @PVince81
    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.

  2. karlitschek commented on Nov 27, 2014

    @karlitschek
    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

  3. changed the title [-][Performance] Always store the preview returned by Imagemagick before resizing it[/-] [+]Always store the preview returned by Imagemagick before resizing it[/+] on Dec 2, 2014
  4. oparoz commented on Jan 22, 2015

    @oparoz
    ContributorAuthor

    Introducing the maximum size preview. #13674

  5. added this to the milestone on Jan 22, 2015
  6. locked as resolved and limited conversation to collaborators on Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions