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

fix N+1 queries in kb_overview_rows #6441

Merged

Conversation

escattone
Copy link
Contributor

@escattone escattone commented Jan 10, 2025

mozilla/sumo#2114

Review and merge #6438 prior to this PR, and then rebase this PR once that's done.

Notes

  • The tests were created and successfully run against the original code. So the tests ensure that the new code in this PR only removes the N+1 problem while maintaining the same results.
  • This PR, combined with fix ready_for_l10n #6438, makes the number of DB queries within the kb_overview_rows() function O(1) instead of O(N) where N is the number of English documents, so the combination of the two PR's should massively improve the performance of https://support.mozilla.org/en-US/contributors/kb-overview.

@escattone escattone requested a review from akatsoulas January 10, 2025 23:41
@escattone escattone changed the title Fix N+1 queries in kb_overview_rows fix N+1 queries in kb_overview_rows Jan 10, 2025
@escattone escattone mentioned this pull request Jan 10, 2025
@akatsoulas akatsoulas merged commit 4b7d349 into mozilla:main Jan 13, 2025
2 checks passed
@escattone escattone deleted the fix-n-plus-one-queries-in-kb-overview-rows branch January 13, 2025 15:26
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