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

Pass excluded categories by reference #1963

Open
wants to merge 4 commits into
base: 2.10.x
Choose a base branch
from

Conversation

fredden
Copy link
Contributor

@fredden fredden commented Oct 7, 2020

We have a website where loading a category page in the admin is so slow it's practically unusable. Upon investigation it was discovered that this code was taking the vast majority of time. This change reduced page load time from ~9 minutes to ~15 seconds.

Smile\ElasticsuiteVirtualCategory\Model\Rule::getCategorySearchQuery() takes an array of category IDs that have already been processed, and therefore should be excluded next time. It adds any categories that have now been processed to this array to avoid infinite loops/recursion. However, because this parameter was not being passed by reference the additions were being thrown away and the same categories were being processed again the next time this is called.

@fredden
Copy link
Contributor Author

fredden commented Aug 22, 2022

Hi @rbayet. What can I do to help get this merged in?

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.

1 participant