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

N+1 query problem on dashboards #3545

Closed
mathjazz opened this issue Jan 24, 2025 · 2 comments · Fixed by #3561
Closed

N+1 query problem on dashboards #3545

mathjazz opened this issue Jan 24, 2025 · 2 comments · Fixed by #3561
Labels
bug P1 Must be fixed immediately, drop any other work performance

Comments

@mathjazz
Copy link
Collaborator

The new stats code (#3536) is making a separate DB query for each of the 369 locales in the /teams page to get theirs stats, which makes it noticeably slower than the old code.

We should change the way get_chart() works and only do 1 query for all locales.

@mathjazz mathjazz added bug P2 We want to ship it soon, possibly in the current quarter performance labels Jan 24, 2025
@github-project-automation github-project-automation bot moved this to 🆕 Needs triage in Pontoon Roadmap Jan 24, 2025
@mathjazz mathjazz moved this from 🆕 Needs triage to 🔖 Ready in Pontoon Roadmap Jan 24, 2025
@eemeli
Copy link
Member

eemeli commented Feb 5, 2025

As noted in #3546 (review):

We're still hitting the N+1 problem in:

  • ajax_projects()
  • ajax_teams()
  • ajax_resources()

@eemeli eemeli added P1 Must be fixed immediately, drop any other work and removed P2 We want to ship it soon, possibly in the current quarter labels Feb 5, 2025
@mathjazz
Copy link
Collaborator Author

mathjazz commented Feb 5, 2025

This might be related. The spikes happen when collect_insights runs.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug P1 Must be fixed immediately, drop any other work performance
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants