Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Faster filtering on submission API v2 endpoint #1654

Merged
merged 1 commit into from
Apr 23, 2021
Merged

Conversation

quantum5
Copy link
Member

Instead of joining the user table and looking up the username, we can
simply look up the profile ID and use the index. A similar optimization
is done for problems. Fixes #1584.

This has been tested on the test site.

@codecov-commenter
Copy link

codecov-commenter commented Apr 23, 2021

Codecov Report

Merging #1654 (c5347d5) into master (23fa853) will increase coverage by 1.04%.
The diff coverage is 51.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1654      +/-   ##
==========================================
+ Coverage   46.13%   47.17%   +1.04%     
==========================================
  Files         215      215              
  Lines       12228    12484     +256     
==========================================
+ Hits         5641     5889     +248     
- Misses       6587     6595       +8     
Impacted Files Coverage Δ
judge/views/api/api_v2.py 47.77% <51.61%> (+0.74%) ⬆️
judge/models/tests/test_problem.py 100.00% <0.00%> (ø)
dmoj/settings.py 98.24% <0.00%> (+0.59%) ⬆️
judge/models/problem.py 92.94% <0.00%> (+4.35%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23fa853...c5347d5. Read the comment docs.

Instead of joining the user table and looking up the username, we can
simply look up the profile ID and use the index. A similar optimization
is done for problems. Fixes #1584.
@quantum5 quantum5 merged commit 4c3d79b into master Apr 23, 2021
@quantum5 quantum5 deleted the fast-api-v2 branch April 23, 2021 19:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize API v2 submissions endpoint
4 participants