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

feat: performance tuning credentials admin #2684

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deborahgu
Copy link
Member

this adds a single index to UserCredential.credential_id. You would think this would be implicitly indexed by the presence of a unique_together, but it isn't. I don't want to get overly exuberant with indices because we have a lot of costly writes during grading already, but I can see using SQL EXPLAIN that making this change does convert the django admin page from using filesort to using index, so theoretically this should speed it up. If it doesn't, I will try a different approach.

Run JavaScript tests locally with Karma

There is work being done on a fix to get Karma to run in CI. Until then, however, contributors are required to run these tests locally.

  • Make sure you are inside the devstack container
  • Run make test-karma
  • All tests pass

this adds a single index to  UserCredential.credential_id. You would
think this would be implicitly indexed by the  presence of a
unique_together, but it isn't. I don't want to get overly exuberant with
indices because we have a lot of costly writes  during grading already,
but I can see  using SQL `EXPLAIN`  that  making this change does
convert the django admin page from `using  filesort` to `using index`,
so theoretically this should speed it up. If it doesn't,  I will try a
different approach.
@deborahgu deborahgu requested a review from a team as a code owner January 15, 2025 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant