Repository navigation
Improving codabench performances - #2707
Conversation
e84d868 to
880b142
Compare
eec325b to
a3c86cd
Compare
|
Some blocking points: 1. Leaderboard shows submissions that aren't on the leaderboardIn Without the submissions_qs = Submission.objects.filter(
phase=instance,
leaderboard=instance.leaderboard,
is_soft_deleted=False,
has_children=False,
is_specific_task_re_run=False,
)If a test was failing with these filters, it's probably the test (or its fixtures) that needs adjusting. 2. Search no longer works for anonymous usersThe 3. The submission refresh fix in
|
5d50b83 to
5006317
Compare
ef8beb8 to
c6f44b7
Compare
|
branch production ready |
Description
This PR is an attempt to improve codabench performances by adding a db index for submission and leaderboard.
Also we add in this PR some django ORM code optimizations for better performances.
We focus on improving API performance while keeping existing logic and behavior.
The main optimizations include using select_related() to reduce database queries from django ORM features.
We also address N+1 query problems in serializers.
A checklist for hand testing
Performance Comparison —
developvsperfBenchmark Configuration
Overall Throughput and Latency
developperfAPI Competition Detail Performance
developperfAPI Leaderboard Performance
developperfSQL Query Count
developperfInterpretation: The
perfbranch significantly reduces the number of SQL queries required, particularly for the leaderboard. The average number of SQL queries per complete user journey is reduced by more than half.SQL Execution Time
developperfTotal SQL execution time is accumulated across all workers. It can exceed the actual benchmark duration because multiple SQL queries are executed in parallel.
HTTP Response Payload Size
developperfChecklist