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

Optimize topics hierarchy helper #6404

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

akatsoulas
Copy link
Collaborator

No description provided.

@akatsoulas akatsoulas requested a review from escattone December 10, 2024 16:40
@akatsoulas akatsoulas changed the title Optimize topics hieararchy helper Optimize topics hierarchy helper Dec 10, 2024
@akatsoulas akatsoulas force-pushed the optimize-topic-hierarchy branch from 33782f1 to 98f41bc Compare December 10, 2024 17:51
Copy link
Contributor

@escattone escattone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When no product is provided in the URL, this still has the problem of making N queries -- where N is the total number of questions in the moderation queue.

By caching based on the question.product.slug, we can provide caching for both cases, when a product slug is provided in the URL, and when one isn't.

I'll add a commit that does that.

@escattone escattone merged commit 7303cd6 into mozilla:main Dec 10, 2024
2 checks passed
@akatsoulas akatsoulas deleted the optimize-topic-hierarchy branch December 11, 2024 07:32
smithellis pushed a commit to smithellis/kitsune that referenced this pull request Dec 19, 2024
* Optimize topics hieararchy helper

* adjust get_hierarchical_topics() for product caching

---------

Co-authored-by: Ryan Johnson <rjohnson@mozilla.com>
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