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

Remove additional queries looking for cached dimensions #501

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

volksman
Copy link

It seems this has been in the package since 2014 but I just noticed it today while trying to optimize server response times. I noticed that when I asked for with width and height of an image I was generating at least 1 extra query per image.

After reviewing the code it looks like a pretty easy win to disable the query to check if there is a dimension cached for a particular image which is being called regardless of the THUMBNAIL_CACHE_DIMENSIONS setting. This seems counter intuitive to me so I've added an if statement to check for the setting before running extra queries to find dimensions.

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.

None yet

1 participant