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

Dont make variations database requests calls when variations aren't being used #1606

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JeffPyeBrook
Copy link
Contributor

Add check to see if variations are defined and used, when they are not defined and used don't make calls through WordPress for variation terms unless working inside the admin area. Avoids lots of small empty queries.

Add checks to variation class to avoid walking off the end of internal arrays

…l arrays

Add check to see if variations are defined and used, when they are not defined and used don't make calls through WordPress for variation terms unless working inside the admin area.  Avoids lots of small empty queries.
@JeffPyeBrook
Copy link
Contributor Author

@JustinSainton along the same lines as the PR we did last night, this PR avoids many similar small unnecessary database calls when product variations are not being used. I recall having mentioned it to you a while back. In my testing it avoids about 10% of the database calls when measured against a full crawl of a sitemap.

You might want to consider it for the old theme engine branch.

If you do want to include it for theme engine 1.0, I can also do a like PR for theme engine 2.0.

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.

2 participants